sitar(x, y, id, data, df, knots, fixed = random, random = "a+b+c", a.formula = ~1, b.formula = ~1, c.formula = ~1, bounds = 0.04, start, bstart = xoffset, xoffset = "mean", returndata = FALSE, verbose = FALSE, correlation = NULL, weights = NULL, subset = NULL, method = "ML", na.action = na.fail, control = nlmeControl(returnObject = TRUE))
"update"(object, ..., evaluate = TRUE)x, y and
id.df quantiles of
x distribution).random)."a+b+c").~ 1).~ 1).~ 1).x for regression spline, or fractional
extension of range (default 0.04).nlme).b (either
"mean", "apv" or value (default xoffset)).x (either "mean"
(default), "apv" or value).subset and subsample for
simulation purposes.nlme).corStruct object describing the
within-group correlation structure (see nlme).varFunc object or one-sided formula
describing the within-group heteroscedasticity structure (see
nlme).nlme).nlme).nlme).nlme).sitar.update call is passed to sitar for evaluation, while
if FALSE the expanded call itself is returned.update consisting of any of the
above sitar parameters.sitar representing the
nonlinear mixed-effects model fit, with all the components returned by
nlme (see nlmeObject for a full description) plus the
following components: following components:Generic functions such as print, plot, anova and
summary have methods to show the results of the fit. The functions
resid, coef, fitted, fixed.effects,
random.effects, predict, getData, getGroups,
getCovariate and getVarCov can be used to extract some of its
components.Note that versions of sitar prior to 1.0.4 did not return
fitnlme. Both plot and predict may require it, in which
case they update the SITAR object on the fly, with a message. Also
version 1.0.5 altered the defaults for xoffset and bstart.
Models fitted with versions prior to 1.0.5 need refitting.
xoffset allows the origin of x to be varied, while
bstart specifies the starting value for b, both of which can
affect the model fit and particularly b. The values of bstart,
knots and bounds are offset by xoffset for fitting
purposes, and similarly for fixed effect b.The formulae a.formula, b.formula and c.formula can
include interactions and functions, but the corresponding names in the model
matrix are changed to remain valid. Hence ':' changes to '.' while '(' and
')' are omitted. The modified not the original names need to be specified in
predict.sitar.
update updates the model by taking the object call, adding any
new parameters and replacing changed ones. Where possible the fixed and
random effects of the model being updated are suitably modified and passed
via the start argument.
data(heights)
## fit simple model
(m1 <- sitar(x=age, y=height, id=id, data=heights, df=5))
## relate random effects to age at menarche (with censored values +ve)
## both a (size) and b (tempo) are positively associated with age at menarche
amen <- abs(heights$men)
(m2 <- update(m1, a.form=~amen, b.form=~amen, c.form=~amen))
Run the code above in your browser using DataLab