step.lm.fit {segmented} | R Documentation |
Fitter Functions for stepmented Linear Models
Description
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.
Usage
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)
Arguments
y |
vector of observations of length |
x.lin , XREG |
design matrix for standard linear terms. |
Xtrue , Z |
appropriate matrix including the stepmented variables whose breakpoints have to be estimated. |
PSI |
appropriate matrix including the starting values of the breakpoints to be estimated. |
ww , w |
possibe weights vector. |
offs |
possibe offset vector. |
opz |
a list including information useful for model fitting. |
n.boot |
the number of bootstrap samples employed in the bootstrap restart algorithm. |
break.boot |
Integer, less than |
size.boot |
the size of the bootstrap resamples. If |
jt |
logical. If |
nonParam |
if |
random |
if |
return.all.sol |
if |
Details
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).
Value
A list of fit information.
Note
These functions should usually not be used directly by the user.
Author(s)
Vito Muggeo
References
Wood, S. N. (2001) Minimizing model fitting objectives that contain spurious local minima by bootstrap restarting. Biometrics 57, 240–244.
See Also
stepmented.lm
or stepmented.glm
Examples
##See ?stepmented