Broken Stick Model for Irregular Longitudinal Data
Overview
Data on multiple individuals through time are often sampled at times that differ between persons. Irregular observation times can severely complicate the statistical analysis of the data. The broken stick model approximates each subject’s trajectory by one or more connected line segments. The times at which segments connect (breakpoints) are identical for all subjects and under control of the user. A well-fitting broken stick model effectively transforms individual measurements made at irregular times into regular trajectories with common observation times. Specification of the model requires three variables: time, measurement and subject. The model is a special case of the linear mixed model, with time as a linear B-spline and subject as the grouping factor. The main assumptions are: subjects are exchangeable, trajectories between consecutive breakpoints are straight, random effects follow a multivariate normal distribution, and unobserved data are missing at random. The package contains functions for fitting the broken stick model to data, for predicting curves in new data and for plotting broken stick estimates. The package supports two optimization methods, and includes options to structure the variance-covariance matrix of the random effects. The analyst may use the software to smooth growth curves by a series of connected straight lines, to align irregularly observed curves to a common time grid, to create synthetic curves at a user-specified set of breakpoints, to estimate the time-to-time correlation matrix and to predict future observations. See doi:10.18637/jss.v106.i07 for additional documentation on background, methodology and applications.
- Maintenance release
- Changes relative URL to absolute URL in
manual.htmlto pass CRAN checks - Repairs a broken link in
README - Applies AIR formatting to all
.Rfiles - Adds GH workflows to check package via
rhub - Solves the
aes_string()deprecation warning (#11)
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-05-12
- WARNING12 OK, 1 WARNING2026-05-11
- OK6 OK2026-03-14
Documentation
- Help pages
- 25includes a package overview page
- Examples that run
- 71%5 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 56%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 16%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 44
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
8 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/growthcharts/brokenstick on 2026-10-11.
GitHub Pages site last deployed 2026-03-13
pkgdown site last built 2026-03-13
Show all practicesHide 2 practices
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2026-03-13
- 2.7.0Latest
- archivedRemoved from CRAN2026-03-02issues were not corrected despite reminders
- RR 4.5.0 released · 2025-04-11
- unarchivedReturned to CRAN2025-03-31
- 2.6.0
- archivedRemoved from CRAN2025-03-21the 'maintainer' is deleting notifications unread
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 2.5.02023-03-22 · diff ↗
- 2.4.02022-10-30 · diff ↗
- 2.3.02022-09-07 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.1.02022-03-30 · diff ↗
- 2.0.02021-11-11 · diff ↗ ·
removed 4 exports
EB, control_brokenstick, make_basis, parse_formulaadded 3 exports
get_omega, plot_trajectory, set_control
Show 3 earlier eventsHide 3 earlier events
- RR 4.1.0 released · 2021-05-18
- 1.1.02020-11-02
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-11-02
- Total releases
- 8 / 6 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 462 KB / 4 files
- Download size
- 1.1 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("brokenstick")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v106.i07.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.