Changelog
Source:NEWS.md
brokenstick 2.5.0
CRAN release: 2023-03-22
- Updates the manual vignette to conform to the accepted JSS manuscript (March 2023)
- Updates the documentation for CRAN release
- Adds the doi:10.18637/jss.v106.i07 for the forthcoming JSS paper to DESCRIPTION and documentation
brokenstick 2.4.0
CRAN release: 2022-10-30
Major changes:
- Update for the JSS manuscript version dated 30-10-2022
- Hiding knots is now more convenient and automatic by setting the
hide
entry in thebrokenstick
object. This replaces thewhatknots
argument.
Minor changes:
- Adds
hide
field tobrokenstick
object - Adds
hide
arguments tocoef.brokenstick()
,summary.brokenstick()
,plot()
,get_knots()
andget_omega
- Adds
cor
andlower
arguments tosummary.brokenstick()
- Replaces
what
argument ofget_omega()
bycor
- Deprecates
whatknots
argument inplot()
,get_knots()
andget_omega()
- Separates
summary()
andprint()
functionality - Updates
smocc_200
andfit_200
objects - Updates to
roxygen 7.2.1
- Replace hard-coded variable name
hgt_z
by a dynamic name (#8)
brokenstick 2.3.0
CRAN release: 2022-09-07
- Replaces
what
argument inget_knots()
towhatknots
- Adds support for
whatknots
inget_omega()
- Extends capabilities of
plot_trajectory()
withshape
andlinetype
options - Adds an example to
plot.brokenstick()
on how to create a decent black and white figure of trajectories - Replaces
knots = 0:3
byknots = 0:2
in examples - Updates the perfectmodel vignette
brokenstick 2.2.0
Major changes:
- Changes the default number of knots in
brokenstick()
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 (usingknots = c(..., ...)
) or the number of knots (usingk = ...
). - Replaces the
strip_data
argument inpredict()
by the a more intuitiveinclude_data
argument. By default, observed data are now included into the predictions, similar topredict.lm()
. - Turns error
Argument 'newdata' is required for a light brokenstick object.
ofbrokenstick()
into a warning and returnsNULL
. - Updates the vignette Broken Stick Model for Irregular Longitudinal Data to sync with revision for JSS.
Minor changes:
- Expression
predict(fit_200_light, x = "knots")
now produces warning message instead of crashing - Updates objects
fit_200
andfit_200_light
to use automatic boundary (2.68y) instead of 3 yrs - Automatically sorts any user-specified values for knots in increasing order to evade problems with
predict()
brokenstick 2.1.0
CRAN release: 2022-03-30
Incorporate changes and updates required by JSS
- Reorganises the vignettes
- Renames
brokenstick-article.Rmd
tomanual/manual.Rmd
, include high-res version on the site and take out of the package to save space - Updates
vignettes/bibliography.bib
to title case - Removes superfluous navigation from vigettes
- Defines an
model.frame.brokenstick()
function that adheres to conventions - Changes return values by
fitted()
andresiduals()
to vectors - Defines a less verbose
print.brokenstick()
helper - Make all calls to
library()
to character argument - Removes
library(lme4)
from code to evade changing the search path
brokenstick 2.0.1
- Shrinks the size of light objects by removing the
sigma2j
vector from the lightbrokenstick
class
brokenstick 2.0.0
CRAN release: 2021-11-11
Main changes
Function
brokenstick()
in version2.0.0
sets the Kasim-Raudenbush sampler as the default method. The former methodlme4::lmer()
remains available by settingmethod = "lmer"
argument.Version
2.0.0
adopts the variable names of thecoda
package (e.g.,start
,end
,thin
,niter
, and so on) and stores the results of the Kasim-Raudenbush sampler as objects of classmcmc
.For
method = "kr"
one may now inspect the solution of the sampler by standard functions from thecoda
package. Formethod = "lmer"
we can apply functions from thelme4
package formerMod
objects.Version
2.0.0
redefines thebrokenstick
class. New entries includecall
,formula
,internal
,sample
,light
,data
,imp
andmod
. Removed entries areknots
(renamed tointernal
) anddraws
(renamed toimp
). We may omit thenewdata
argument for the training data. Settinglight = TRUE
creates a small version of thebrokenstick
object. Objects of classbrokenstick
are not backwards compatible, so one should regenerate objects of classbrokenstick
in order use newer features in2.0.0
.Version
2.0.0
conforms to classic model fitting interface inR
. Renames thenew_data
argument tonewdata
to conform topredict.lm()
. Methodsplot()
andpredict()
no longer require anewdata
argument. All special cases ofpredict()
updated and explained in documentation and examples.Version
2.0.0
adds methodscoef()
,fitted()
,model.frame()
,model.matrix()
,print()
andsummary
for thebrokenstick
object.Simplifies algorithmic control. Renames
control_brokenstick()
toset_control()
and removes a layer in the control list.
Minor changes
- Stabilises the
rgamma()
calls in KR-algorithm for edge cases. -
predict_brokenstick()
can now work with the both (internal) training and (external) test data. - Removes the superfluous
type
argument frompredict.brokenstick()
- Adds a function
get_omega()
to extract the variance-covariance matrix of the broken stick estimates - Adds choice
"dropfirst"
toget_knots()
- Improves error messages of edge cases in
test-brokenstick_edge.R
- Perform stricter tests on arguments of
brokenstick()
- Introduces argument
warn_splines
inmake_basis()
to suppress uninteresting warns fromsplines::bs()
- Removes superfluous
knotnames
argument inmake_basis()
- Argument
x
inmake_basis()
is now a vector instead of a column vector - Introduces new
xname
argument inmake_basis()
to set the xname
brokenstick 1.1.1
- Handles an edge case that crashed
predict()
brokenstick 1.1.0
CRAN release: 2020-11-02
This version adds a couple of minor alterations.
- Updates cran-comments
- Adds a link to the JSS manuscript in the
description
field - Removes unnecessary
\dontrun{}
directives - Exports
parse_formula()
to remove:::
from examples - Sanitises chunk names by removing
:
and_
characters - Corrects some “first-order” mindo’s to “second-order”
- Repairs plotting glitch in
oldfriends.Rmd
- Limits number of printed rows in
predict.brokenstick()
example
brokenstick 1.0.0
- Ready for CRAN –> Move up to version 1.0.0
- The package is now hosted on
https://github.com/growthcharts/brokenstick/
brokenstick 0.77.0
- Add documentation for the brokenstick class object
- Add JSS manuscript as a vignette
- Remove the prediction vignette and its dependencies
- Extend
plot.brokenstick()
with the ability to plot imputed trajectories - Add the
weightloss
data - Fail early when user specifies
degree > 1
brokenstick 0.76.0
- Adds argument
what
toplot.brokenstick()
- Solves a bug that always yielded zero rows for case 3 prediction
- Solves a data combination problem in
predict()
when the group variable is a factor - Add a better explanation of the
boundary
parameter - Evades that
model.matrix()
removes rows withNA
ifdegree = 0
brokenstick 0.75.0
- This version trims down the package in various ways
- Removes dependencies of
hardhat
andrecipes
- Makes the
brokenstick
object smaller since no blueprints are stored - Removes the
recipe
interface to thebrokenstick()
function - Moves
ggplot2
tosuggests
- Copies over the
install.on.demand()
function frommice
brokenstick 0.71.0
- Removes the dependency on
growthstandards
- Updates and corrects
plot
examples - Tries to evade
ggplot2
out-of-range/missing messages through better filtering
brokenstick 0.70.0
- This version jump illustrates big and breaking changes:
brokenstick
adopted thetidymodels
philosophy, and now includes a dependency onhardhat
. 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 classbrokenstick
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 thebrokenstick
class does not store the training data anymore, thepredict()
function now obtains anew_data
argument. Syntax that worked forbrokenstick
package before0.70.0
does not work anymore and should be updated. Theshape
argument replaces theoutput
argument.The
plot()
function is rewritten, and now requires anew_data
specification.Retired functions:
brokenstick()
replacesfit_brokenstick()
,predict.brokenstick()
replacespredict.brokenstick_export()
,get_r2()
replacesget_pev()
Removed functions:
get_data()
,get_X()
,export()
brokenstick 0.62.0
- This version simplifies the plotting functions
- Renders
ggplot
objects sharper in vignettes bysvglite
- Drops the
pkg
argument inplot.brokenstick()
- Lessens the dependency on
rbokeh
- Replaces
hbgd
(which is no longer developed) bygrowthstandards
package - Replaces
smocc_50
/fit_50
bysmocc_200
/fit_200
- Added a
NEWS.md
file to track changes to the package
brokenstick 0.61.0
- Added
smocc_50
andfit_50
demo data - Removed
smocc.hgtwgt
,smocc_hgtwgt
andfit_206 datasets
- Adapt code and vignettes to reflect replacement of demo data
brokenstick 0.55
- Added new utility function
get_pev()
for proportion explained variance -
get_knots()
gets awhat
argument - Now using smarter defaults for
plot()
- Simplified arguments to
plot()
- Simplified vignette “Overview of main functions”
brokenstick 0.54
- Added Support for
ggplot2
- Made
ggplot2
plot default - Changed default
show_references
flag to FALSE
brokenstick 0.53
- This is the version announced during my invited lecture at the 7th Channel Network Conference, Hasselt, Belgium.
Here is the abstract of the lecture:
Broken stick model for individual growth curves
Stef van Buuren
- Netherlands Organization for Applied Scientific Research TNO
- Utrecht University
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
- to smooth growth curves by a series of connected straight lines;
- to align irregularly observed curves to a common age grid;
- to create synthetic curves at a user-specified set of break ages;
- to estimate the time-to-time correlation matrix;
- to predict future observations.
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.