Skip to content

brokenstick

Broken Stick Model for Irregular Longitudinal Data

v2.7.0 · Mar 13, 2026 · MIT + file LICENSE

Description

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.

Downloads

CRAN

668

Last 30 days

4788th

2.1K

Last 90 days

6.3K

Last year

Trend: +0.5% (30d vs prior 30d)

r2u CRAN

13

Last 30 days

54

Last 90 days

157

Last year

Trend: -27.8% (30d vs prior 30d)

autoCRAN

13

Last 7 days

85

Last 30 days

6

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 12, 2026
WARNING 12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE May 11, 2026
WARNING r-devel-linux-x86_64-debian-gcc

PDF version of manual

LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
OK 6 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 13, 2026

Dependency Network

Dependencies Reverse dependencies coda dplyr lme4 matrixsampling rlang tidyr brokenstick

Version History

8 tracked
new 2.7.0 Mar 13, 2026
update 2.6.0 ← 2.5.0 diff Mar 30, 2025
update 2.5.0 ← 2.4.0 diff Mar 21, 2023
update 2.4.0 ← 2.3.0 diff Oct 29, 2022
update 2.3.0 ← 2.1.0 diff Sep 6, 2022
update 2.1.0 ← 2.0.0 diff Mar 29, 2022
update 2.0.0 ← 1.1.0 diff Nov 10, 2021
new 1.1.0 Nov 1, 2020