{
  "_id": "6a103210acfb0bcc41c975d3",
  "Package": "brokenstick",
  "Type": "Package",
  "Title": "Broken Stick Model for Irregular Longitudinal Data",
  "Version": "2.7.0",
  "Authors@R": "person(\"Stef\", \"van Buuren\", email = \"stef.vanbuuren@tno.nl\", role = c(\"aut\",\"cre\"))",
  "Description": "Data on multiple individuals through time are often\nsampled at times that differ between persons. Irregular\nobservation times can severely complicate the statistical\nanalysis of the data. The broken stick model approximates each\nsubject’s trajectory by one or more connected line segments.\nThe times at which segments connect (breakpoints) are identical\nfor all subjects and under control of the user. A well-fitting\nbroken stick model effectively transforms individual\nmeasurements made at irregular times into regular trajectories\nwith common observation times. Specification of the model\nrequires three variables: time, measurement and subject. The\nmodel is a special case of the linear mixed model, with time as\na linear B-spline and subject as the grouping factor. The main\nassumptions are: subjects are exchangeable, trajectories\nbetween consecutive breakpoints are straight, random effects\nfollow a multivariate normal distribution, and unobserved data\nare missing at random. The package contains functions for\nfitting the broken stick model to data, for predicting curves\nin new data and for plotting broken stick estimates. The\npackage supports two optimization methods, and includes options\nto structure the variance-covariance matrix of the random\neffects. The analyst may use the software to smooth growth\ncurves by a series of connected straight lines, to align\nirregularly observed curves to a common time grid, to create\nsynthetic curves at a user-specified set of breakpoints, to\nestimate the time-to-time correlation matrix and to predict\nfuture observations. See <doi:10.18637/jss.v106.i07> for\nadditional documentation on background, methodology and\napplications.",
  "URL": "doi:10.18637/jss.v106.i07, https://growthcharts.org/brokenstick/",
  "BugReports": "https://github.com/growthcharts/brokenstick/issues",
  "Encoding": "UTF-8",
  "License": "MIT + file LICENSE",
  "LazyData": "TRUE",
  "VignetteBuilder": "knitr",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/pak/sysreqs": "cmake make libicu-dev",
  "Repository": "https://growthcharts.r-universe.dev",
  "Date/Publication": "2026-03-13 13:56:08 UTC",
  "RemoteUrl": "https://github.com/growthcharts/brokenstick",
  "RemoteRef": "HEAD",
  "RemoteSha": "008044f6226be6a1712cea07dffac59f54b1c4b0",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-12 08:54:21 UTC",
    "User": "root"
  },
  "Author": "Stef van Buuren [aut, cre]",
  "Maintainer": "Stef van Buuren <stef.vanbuuren@tno.nl>",
  "MD5sum": "c4d051e46114460369e9214ea7116e11",
  "_user": "growthcharts",
  "_type": "src",
  "_file": "brokenstick_2.7.0.tar.gz",
  "_fileid": "d40b09351aa4bc5054408115cf64e7c34d3fd03e3d0e996bd3c8ae2e19971511",
  "_filesize": 1935609,
  "_sha256": "d40b09351aa4bc5054408115cf64e7c34d3fd03e3d0e996bd3c8ae2e19971511",
  "_created": "2026-05-12T08:54:21.000Z",
  "_published": "2026-05-22T10:38:08.160Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77363079079,
      "time": 194,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6939837725"
    },
    {
      "job": 77363079524,
      "time": 195,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939838404"
    },
    {
      "job": 77363079460,
      "time": 167,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6939820160"
    },
    {
      "job": 77363079265,
      "time": 167,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939818444"
    },
    {
      "job": 77363078705,
      "time": 249,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939771662"
    },
    {
      "job": 77363078487,
      "time": 130,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7158514463"
    },
    {
      "job": 77363078799,
      "time": 138,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6939819448"
    },
    {
      "job": 77363079566,
      "time": 161,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6939819789"
    },
    {
      "job": 77363078916,
      "time": 169,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939823002"
    }
  ],
  "_buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/growthcharts/brokenstick",
  "_commit": {
    "id": "008044f6226be6a1712cea07dffac59f54b1c4b0",
    "author": "Stef van Buuren <stef.vanbuuren@tno.nl>",
    "committer": "Stef van Buuren <stef.vanbuuren@tno.nl>",
    "message": "Remove CRAN-SUBMISSION file\n",
    "time": 1773410168
  },
  "_maintainer": {
    "name": "Stef van Buuren",
    "email": "stef.vanbuuren@tno.nl",
    "login": "stefvanbuuren",
    "uuid": 3919919
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "coda",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "lme4",
      "role": "Imports"
    },
    {
      "package": "matrixsampling",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "splines",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "AGD",
      "role": "Suggests"
    },
    {
      "package": "bookdown",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "grDevices",
      "role": "Suggests"
    },
    {
      "package": "gridExtra",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "lattice",
      "role": "Suggests"
    },
    {
      "package": "MASS",
      "role": "Suggests"
    },
    {
      "package": "Matrix",
      "role": "Suggests"
    },
    {
      "package": "mice",
      "role": "Suggests"
    },
    {
      "package": "mvtnorm",
      "role": "Suggests"
    },
    {
      "package": "plyr",
      "role": "Suggests"
    },
    {
      "package": "svglite",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "growthcharts",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-11",
      "n": 14
    }
  ],
  "_tags": [
    {
      "name": "v2.7.0",
      "date": "2026-03-13"
    }
  ],
  "_topics": [
    "b-spline",
    "growth-curves",
    "linear-mixed-models",
    "longitudinal-data"
  ],
  "_stars": 9,
  "_contributors": [
    {
      "user": "stefvanbuuren",
      "count": 599,
      "uuid": 3919919
    }
  ],
  "_userbio": {
    "uuid": 70215749,
    "type": "organization",
    "name": "growthcharts",
    "description": "Home of JAMES: Joint Automatic Measurement and Evaluation System"
  },
  "_downloads": {
    "count": 684,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/brokenstick"
  },
  "_devurl": "https://github.com/growthcharts/brokenstick",
  "_pkgdown": "https://growthcharts.org/brokenstick/",
  "_searchresults": 14,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/brokenstick.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/growthcharts/brokenstick",
  "_realowner": "growthcharts",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.1.0",
      "date": "2020-11-02"
    },
    {
      "version": "2.0.0",
      "date": "2021-11-11"
    },
    {
      "version": "2.1.0",
      "date": "2022-03-30"
    },
    {
      "version": "2.3.0",
      "date": "2022-09-07"
    },
    {
      "version": "2.4.0",
      "date": "2022-10-30"
    },
    {
      "version": "2.5.0",
      "date": "2023-03-23"
    },
    {
      "version": "2.6.0",
      "date": "2025-03-31"
    },
    {
      "version": "2.7.0",
      "date": "2026-03-13"
    }
  ],
  "_exports": [
    "brokenstick",
    "control_kr",
    "get_knots",
    "get_omega",
    "get_r2",
    "kr",
    "plot_trajectory",
    "robust_chol2inv",
    "set_control"
  ],
  "_datasets": [
    {
      "name": "fit_200",
      "title": "Broken stick model with nine lines for 200 children",
      "object": "fit_200",
      "class": [
        "brokenstick"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "fit_200_light",
      "title": "Broken stick model with nine lines for 200 children (light)",
      "object": "fit_200_light",
      "class": [
        "brokenstick"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "smocc_200",
      "title": "Infant growth of 0-2 years, SMOCC data extract",
      "object": "smocc_200",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "id",
        "age",
        "sex",
        "ga",
        "bw",
        "hgt",
        "hgt_z"
      ],
      "rows": 1942,
      "table": true,
      "tojson": true
    },
    {
      "name": "weightloss",
      "title": "Weight loss self-measurement data",
      "object": "weightloss",
      "class": [
        "data.frame"
      ],
      "fields": [
        "subject",
        "day",
        "sex",
        "week",
        "condition",
        "body_weight"
      ],
      "rows": 756,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "brokenstick-package",
      "title": "'brokenstick': A package for irregular longitudinal data.",
      "topics": [
        "brokenstick-package"
      ]
    },
    {
      "page": "brokenstick",
      "title": "Fit a 'brokenstick' model to irregular data",
      "topics": [
        "brokenstick"
      ]
    },
    {
      "page": "brokenstick-class",
      "title": "Class 'brokenstick'",
      "topics": [
        "brokenstick-class"
      ]
    },
    {
      "page": "coef",
      "title": "Extract Model Coefficients from brokenstick Object",
      "topics": [
        "coef.brokenstick"
      ]
    },
    {
      "page": "control_kr",
      "title": "Set controls for Kasim-Raudenbush sampler",
      "topics": [
        "control_kr"
      ]
    },
    {
      "page": "EB",
      "title": "Empirical Bayes predictor for random effects",
      "topics": [
        "EB"
      ]
    },
    {
      "page": "fit_200",
      "title": "Broken stick model with nine lines for 200 children",
      "topics": [
        "fit_200"
      ]
    },
    {
      "page": "fit_200_light",
      "title": "Broken stick model with nine lines for 200 children (light)",
      "topics": [
        "fit_200_light"
      ]
    },
    {
      "page": "fitted.brokenstick",
      "title": "Calculate fitted values",
      "concept": [
        "brokenstick"
      ],
      "topics": [
        "fitted.brokenstick"
      ]
    },
    {
      "page": "get_knots",
      "title": "Obtain the knots from a broken stick model",
      "topics": [
        "get_knots"
      ]
    },
    {
      "page": "get_omega",
      "title": "Extract Variance and Correlation Components",
      "topics": [
        "get_omega"
      ]
    },
    {
      "page": "get_r2",
      "title": "Obtain proportion of explained variance from a broken stick model",
      "topics": [
        "get_r2"
      ]
    },
    {
      "page": "kr",
      "title": "Kasim-Raudenbush sampler for two-level normal model",
      "topics": [
        "kr"
      ]
    },
    {
      "page": "make_basis",
      "title": "Create linear splines basis",
      "topics": [
        "make_basis"
      ]
    },
    {
      "page": "parse_formula",
      "title": "Parse formula for brokenstick model",
      "topics": [
        "parse_formula"
      ]
    },
    {
      "page": "plot_trajectory",
      "title": "Plot observed and fitted trajectories from fitted brokenstick model",
      "topics": [
        "plot_trajectory"
      ]
    },
    {
      "page": "plot.brokenstick",
      "title": "Plot observed and fitted trajectories by group",
      "topics": [
        "plot.brokenstick"
      ]
    },
    {
      "page": "predict",
      "title": "Predict from a 'brokenstick' model",
      "topics": [
        "predict.brokenstick"
      ]
    },
    {
      "page": "print",
      "title": "Print brokenstick object",
      "topics": [
        "print.brokenstick"
      ]
    },
    {
      "page": "residuals.brokenstick",
      "title": "Extract residuals from brokenstick model",
      "concept": [
        "brokenstick"
      ],
      "topics": [
        "residuals.brokenstick"
      ]
    },
    {
      "page": "robust_chol2inv",
      "title": "Robust inversion of symmetric matrices",
      "topics": [
        "robust_chol2inv"
      ]
    },
    {
      "page": "set_control",
      "title": "Set controls to steer calculations",
      "topics": [
        "set_control"
      ]
    },
    {
      "page": "smocc_200",
      "title": "Infant growth of 0-2 years, SMOCC data extract",
      "topics": [
        "smocc_200"
      ]
    },
    {
      "page": "summary",
      "title": "Create summary of brokenstick object",
      "topics": [
        "summary.brokenstick"
      ]
    },
    {
      "page": "weightloss",
      "title": "Weight loss self-measurement data",
      "topics": [
        "weightloss"
      ]
    }
  ],
  "_readme": "https://github.com/growthcharts/brokenstick/raw/HEAD/README.md",
  "_rundeps": [
    "boot",
    "cli",
    "coda",
    "cpp11",
    "dplyr",
    "generics",
    "glue",
    "keep",
    "lattice",
    "lifecycle",
    "lme4",
    "magrittr",
    "MASS",
    "Matrix",
    "matrixsampling",
    "minqa",
    "nlme",
    "nloptr",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "rbibutils",
    "Rcpp",
    "RcppEigen",
    "Rdpack",
    "reformulas",
    "rlang",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "perfectmodel.Rmd",
      "filename": "perfectmodel.html",
      "title": "Check perfect model",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Objective",
        "Data generation",
        "Fit model",
        "Conclusions"
      ],
      "created": "2016-02-26 16:25:19",
      "modified": "2022-10-27 15:18:03",
      "commits": 18
    },
    {
      "source": "brokenstick.Rmd",
      "filename": "brokenstick.html",
      "title": "Getting started",
      "engine": "knitr::rmarkdown",
      "headings": [
        "What is the broken stick model?",
        "What are the main model assumptions?",
        "Why should I want to use the broken stick model?",
        "What is in the package?",
        "Acknowledgment"
      ],
      "created": "2020-10-13 20:50:29",
      "modified": "2023-03-22 19:42:35",
      "commits": 9
    },
    {
      "source": "oldfriends.Rmd",
      "filename": "oldfriends.html",
      "title": "Help for old friends",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Background",
        "Main changes",
        "Minor changes",
        "Install legacy version",
        "Examples",
        "Example 1: Fit model",
        "Example 2: Predict model",
        "Example 3: Plot model"
      ],
      "created": "2020-06-15 19:48:08",
      "modified": "2022-10-27 15:18:03",
      "commits": 17
    },
    {
      "source": "mainfunctions.Rmd",
      "filename": "mainfunctions.html",
      "title": "Overview of main functions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Objective",
        "Plot trajectories",
        "Fit broken stick model with one line",
        "Fit broken stick model with two lines",
        "Extend to nine lines",
        "Obtain predicted values",
        "Explained variance",
        "Subject level analysis",
        "Conclusion"
      ],
      "created": "2016-09-21 16:36:20",
      "modified": "2026-03-13 08:43:05",
      "commits": 47
    }
  ],
  "_score": 5.401400540781545,
  "_indexed": true,
  "_nocasepkg": "brokenstick",
  "_universes": [
    "growthcharts",
    "stefvanbuuren"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.7.0",
      "date": "2026-05-12T08:57:01.000Z",
      "distro": "noble",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "3efa02241f12b73553eeb29c1c838390616cba202d24035443555d3827c76d97",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.7.0",
      "date": "2026-05-12T08:57:18.000Z",
      "distro": "noble",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "79db889f079a88c916217d70c3ddab2a135318adaa4bb291c5212542171b9b70",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.7.0",
      "date": "2026-05-12T08:56:32.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "3d10b8ad0239e0319607ae127880d2b89b3d11d4adbec17d2cb3511882ffbe33",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.7.0",
      "date": "2026-05-12T08:56:22.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "41046d09f28e9f05688391f85da1cc0a95ed6cc4ee40969b9c306200d093d0f4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.7.0",
      "date": "2026-05-12T08:56:03.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "d8511b0e1d9d8b414a3a312f6ce6859b1c6355decac4abdf27f5149bc8c53f84",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.7.0",
      "date": "2026-05-12T08:56:08.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "fbc89f4198123af3418f13a01918a2baa7054407f46a4386e1c4d149ebd4f263",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.7.0",
      "date": "2026-05-12T08:56:09.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "cc107495c8720ce43e61d39196331bc02a4f5646ac56418cc03402c52a54e3f5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.7.0",
      "date": "2026-05-22T10:37:45.000Z",
      "commit": "008044f6226be6a1712cea07dffac59f54b1c4b0",
      "fileid": "dc5aaebc6f7f705567054d3a3b7d5c107ddca5169cff16ad8aad1ba79eb55ee4",
      "status": "success",
      "buildurl": "https://github.com/r-universe/growthcharts/actions/runs/25723873749"
    }
  ]
}