step.lm.fit
is called by stepmented.lm
to fit stepmented linear
(gaussian) models. Likewise, step.glm.fit
is called by stepmented.glm
to fit
generalized stepmented linear models.
The step.*.fit.boot
functions are employed to perform bootstrap restarting.
These functions should usually not be used directly by the user.
step.lm.fit(y, x.lin, Xtrue, PSI, ww, offs, opz, return.all.sol=FALSE) step.lm.fit.boot(y, XREG, Z, PSI, w, offs, opz, n.boot=10, size.boot=NULL,
jt=FALSE, nonParam=TRUE, random=FALSE, break.boot=n.boot)
step.glm.fit(y, x.lin, Xtrue, PSI, ww, offs, opz, return.all.sol=FALSE)
step.glm.fit.boot(y, XREG, Z, PSI, w, offs, opz, n.boot=10, size.boot=NULL,
jt=FALSE, nonParam=TRUE, random=FALSE, break.boot=n.boot)
A list of fit information.
vector of observations of length n
.
design matrix for standard linear terms.
appropriate matrix including the stepmented variables whose breakpoints have to be estimated.
appropriate matrix including the starting values of the breakpoints to be estimated.
possibe weights vector.
possibe offset vector.
a list including information useful for model fitting.
the number of bootstrap samples employed in the bootstrap restart algorithm.
Integer, less than n.boot
. If break.boot
consecutive bootstrap samples lead to the same objective function, the algorithm stops without performing all n.boot
'trials'.
This can save computational time considerably.
the size of the bootstrap resamples. If NULL
(default), it is taken equal to the sample size.
values smaller than the sample size are expected to increase perturbation in the bootstrap resamples.
logical. If TRUE
the values of the stepmented variable(s) are jittered before fitting the model to the
bootstrap resamples.
if TRUE
nonparametric bootstrap (i.e. case-resampling) is used, otherwise residual-based.
if TRUE
, when the algorithm fails to obtain a solution, random values are used as candidate values.
if TRUE
, when the algorithm fails to obtain a solution, the values visited by the algorithm
with corresponding deviances are returned.
Vito Muggeo
The functions call iteratively lm.wfit
(or glm.fit
) with proper design matrix depending on
XREG
, Z
and PSI
. step.lm.fit.boot
(and step.glm.fit.boot
) implements the bootstrap restarting idea discussed in
Wood (2001).
Wood, S. N. (2001) Minimizing model fitting objectives that contain spurious local minima by bootstrap restarting. Biometrics 57, 240--244.
stepmented.lm
or stepmented.glm