The main fitting function brokenstick() returns an object of class
brokenstick. This object collects the fitted broken stick model.
Details
The package exports S3 methods for the brokenstick class for the following
generic functions: coef(), fitted(), model.frame(), model.matrix(),
plot(), predict(), print(), residuals() and summary().
The package exports the following helper functions for brokenstick objects:
get_knots(), get_omega() and get_r2().
A brokenstick object is a list with the following named elements:
Elements
callCall that created the object
namesA named list with three elements (
"x","y","g") providing the variable name for time, outcome and subject, respectively.internalNumeric vector of with internal knots.
boundaryNumeric vector of length 2 with the boundary knots.
degreeThe
degreeof the B-spline. Seesplines::bs(). Support only the values of 0 (step model) or 1 (broken stick model).methodString, either
"kr"or"lmer", identifying the fitting model.controlList of control options returned by
set_control()used to set algorithmic details.betaNumeric vector with fixed effect estimates.
omegaNumeric matrix with variance-covariance estimates of the broken stick estimates.
sigma2Numeric scalar with the mean residual variance.
sampleA numeric vector with descriptives of the training data.
lightShould the returned object be lighter? If
light = TRUEthe returned object will contain only the model settings and parameter estimates and not store thesigma2j,sample,data,impandmodelements. The light object can be used to predict broken stick estimates for new data, but does not disclose the training data and is small.hideShould the output for boundary knots be hidden? Can be
"right","left","boundary","internal"or"none". The default is"right".sigma2jNumeric vector with estimates of the residual variance per group. Only used by method
"kr".dataThe training data used to fit the model.
impThe imputations generated for the missing outcome data. Only for
method = "kr".modFor
method = "kr": A named list with four components, each of class coda::mcmc. Formethod = "lmer": An object of class lme4::merMod.