Usage
seg.lm.fit(y, XREG, Z, PSI, w, offs, opz, return.all.sol=FALSE)
seg.lm.fit.boot(y, XREG, Z, PSI, w, offs, opz, n.boot=10,
size.boot=NULL, jt=FALSE, nonParam=TRUE, random=FALSE)
seg.glm.fit(y, XREG, Z, PSI, w, offs, opz, return.all.sol=FALSE)
seg.glm.fit.boot(y, XREG, Z, PSI, w, offs, opz, n.boot=10,
size.boot=NULL, jt=FALSE, nonParam=TRUE, random=FALSE)
seg.def.fit(obj, Z, PSI, mfExt, opz, return.all.sol=FALSE)
seg.def.fit.boot(obj, Z, PSI, mfExt, opz, n.boot=10, size.boot=NULL,
jt=FALSE, nonParam=TRUE, random=FALSE)
seg.Ar.fit(obj, XREG, Z, PSI, opz, return.all.sol=FALSE)
seg.Ar.fit.boot(obj, XREG, Z, PSI, opz, n.boot=10, size.boot=NULL, jt=FALSE,
nonParam=TRUE, random=FALSE)
Arguments
y
vector of observations of length n
.
XREG
design matrix for standard linear terms.
Z
appropriate matrix including the segmented variables whose breakpoints have to be estimated.
PSI
appropriate matrix including the starting values of the breakpoints to be estimated.
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.
size.boot
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.
jt
logical. If TRUE
the values of the segmented variable(s) are jittered before fitting the model to the
bootstrap resamples.
nonParam
if TRUE
nonparametric bootstrap (i.e. case-resampling) is used, otherwise residual-based.
random
if TRUE
, when the algorithm fails to obtain a solution, random values are used as candidate values.
return.all.sol
if TRUE
, when the algorithm fails to obtain a solution, the values visited by the algorithm
with corresponding deviances are returned.
obj
the starting regression model where the segmented relationships have to be added.