royxgen2 7.3.2robust_chol2inv() to evade edge case on MKL
Fedora 40hide entry in the brokenstick object. This
replaces the whatknots argument.hide field to brokenstick objecthide arguments to coef.brokenstick(),
summary.brokenstick(), plot(),
get_knots() and get_omegacor and lower arguments to
summary.brokenstick()what argument of get_omega() by
corwhatknots argument in plot(),
get_knots() and get_omega()summary() and print()
functionalitysmocc_200 and fit_200 objectsroxygen 7.2.1hgt_z by a dynamic
name (#8)what argument in get_knots() to
whatknotswhatknots in
get_omega()plot_trajectory() with
shape and linetype optionsplot.brokenstick() on how to create
a decent black and white figure of trajectoriesknots = 0:3 by knots = 0:2 in
examplesbrokenstick() to
5. The former default produced a solution without internal knots. The
new default produces a generally more informative starting model when
the user does not specify knots (using knots = c(..., ...))
or the number of knots (using k = ...).strip_data argument in
predict() by the a more intuitive include_data
argument. By default, observed data are now included into the
predictions, similar to predict.lm().Argument 'newdata' is required for a light brokenstick object.
of brokenstick() into a warning and returns
NULL.predict(fit_200_light, x = "knots") now
produces warning message instead of crashingfit_200 and fit_200_light
to use automatic boundary (2.68y) instead of 3 yrspredict()brokenstick-article.Rmd to
manual/manual.Rmd, include high-res version on the site and
take out of the package to save spacevignettes/bibliography.bib to title casemodel.frame.brokenstick() function that
adheres to conventionsfitted() and
residuals() to vectorsprint.brokenstick() helperlibrary() to character argumentlibrary(lme4) from code to evade changing the
search pathformula list elementsigma2j vector from the light brokenstick
classFunction brokenstick() in version 2.0.0
sets the Kasim-Raudenbush sampler as the default method. The former
method lme4::lmer() remains available by setting
method = "lmer" argument.
Version 2.0.0 adopts the variable names of the
coda package (e.g., start, end,
thin, niter, and so on) and stores the results
of the Kasim-Raudenbush sampler as objects of class
mcmc.
For method = "kr" one may now inspect the solution
of the sampler by standard functions from the coda package.
For method = "lmer" we can apply functions from the
lme4 package for merMod objects.
Version 2.0.0 redefines the brokenstick
class. New entries include call, formula,
internal, sample, light,
data, imp and mod. Removed
entries are knots (renamed to internal) and
draws (renamed to imp). We may omit the
newdata argument for the training data. Setting
light = TRUE creates a small version of the
brokenstick object. Objects of class
brokenstick are not backwards compatible, so one should
regenerate objects of class brokenstick in order use newer
features in 2.0.0.
Version 2.0.0 conforms to classic model fitting
interface in R. Renames the new_data argument
to newdata to conform to predict.lm(). Methods
plot() and predict() no longer require a
newdata argument. All special cases of
predict() updated and explained in documentation and
examples.
Version 2.0.0 adds methods coef(),
fitted(), model.frame(),
model.matrix(), print() and
summary for the brokenstick object.
Simplifies algorithmic control. Renames
control_brokenstick() to set_control() and
removes a layer in the control list.
rgamma() calls in KR-algorithm for edge
cases.predict_brokenstick() can now work with the both
(internal) training and (external) test data.type argument from
predict.brokenstick()get_omega() to extract the
variance-covariance matrix of the broken stick estimates"dropfirst" to
get_knots()test-brokenstick_edge.Rbrokenstick()warn_splines in
make_basis() to suppress uninteresting warns from
splines::bs()knotnames argument in
make_basis()x in make_basis() is now a vector
instead of a column vectorxname argument in
make_basis() to set the xnamepredict()This version adds a couple of minor alterations.
description
field\dontrun{} directivesparse_formula() to remove ::: from
examples: and _
charactersoldfriends.Rmdpredict.brokenstick()
examplehttps://github.com/growthcharts/brokenstick/plot.brokenstick() with the ability to plot
imputed trajectoriesweightloss datadegree > 1what to
plot.brokenstick()predict() when the
group variable is a factorboundary parametermodel.matrix() removes rows with
NA if degree = 0hardhat and
recipesbrokenstick object smaller since no
blueprints are storedrecipe interface to the
brokenstick() functionggplot2 to suggestsinstall.on.demand() function from
micerecipes::recipe() to inform R package
installation processgrowthstandardsplot examplesggplot2 out-of-range/missing messages
through better filteringdegree = 0brokenstick adopted the tidymodels
philosophy, and now includes a dependency on hardhat. It is
now possible to fit a model using five different interfaces. There is no
need anymore the hardcode variable names in the source data.
This version introduces a new estimation method, the
Kasim-Raudenbush sampler. The new method is more flexible and faster
than lme4::lmer() when the number of knots is
large.
This version introduces two simple correlation models that may be used to smooth out the variance-covariance matrix of the random effects.
The definition of the brokenstick class has changed.
Objects of class brokenstick do no longer store the
training data.
The brokenstick_export class is retired.
The predict() function is fully rewritten as has now
a new interface. Since the brokenstick class does not store
the training data anymore, the predict() function now
obtains a new_data argument. Syntax that worked for
brokenstick package before 0.70.0 does not
work anymore and should be updated. The shape argument
replaces the output argument.
The plot() function is rewritten, and now requires a
new_data specification.
Retired functions: brokenstick() replaces
fit_brokenstick(), predict.brokenstick()
replaces predict.brokenstick_export(),
get_r2() replaces get_pev()
Removed functions: get_data(), get_X(),
export()
ggplot objects sharper in vignettes by
svglitepkg argument in
plot.brokenstick()rbokehhbgd (which is no longer developed) by
growthstandards packagesmocc_50/fit_50 by
smocc_200/fit_200NEWS.md file to track changes to the
packagesmocc_50 and fit_50 demo datasmocc.hgtwgt, smocc_hgtwgt and
fit_206 datasetsget_pev() for proportion
explained varianceget_knots() gets a what argumentplot()plot()ggplot2ggplot2 plot defaultshow_references flag to FALSEHere is the abstract of the lecture:
Broken stick model for individual growth curves
Stef van Buuren
The broken stick model describes a set of individual curves by a linear mixed model using second-order linear B-splines. The model can be used
The user specifies a set of break ages at which the straight lines connect. Each individual obtains an estimate at each break age, so the set of estimates of the individual form a smoothed version of the observed trajectory.
The main assumptions of the broken stick model are that the development between the break ages follows a straight line, and that the broken stick estimates follow a common multivariate normal distribution. In order to conform to the assumption of multivariate normality, the user may fit the broken stick model on suitably transformed data that yield the standard normal (Z-score) scale.
This lecture outlines the model and introduces the brokenstick R package.