R/Segmented.R
createSegmentedArgs.Rd
Create a parameter object for the function createSegmentedModel
createSegmentedArgs(
modelType,
seg.Z = ~eventDate,
psi = NA,
npsi = NA,
fixed.psi = NULL,
control = segmented::seg.control(),
model = TRUE
)
One of: linear or poisson
the segmented variables(s), i.e. the continuous covariate(s) understood to have a piecewise-linear relationship with response. It is a formula with no response variable, such as seg.Z=~x or seg.Z=~x1+x2.
Starting values for the breakpoints to be estimated. If there is a single segmented variable specified in seg.Z, psi is a numeric vector
A named vector or list meaning the number (and not locations) of breakpoints to be estimated.
An optional named list meaning the breakpoints to be kept fixed during the estimation procedure. The names should be a subset of (or even the same) variables specified in seg.Z. If there is a single variable in seg.Z, a simple numeric vector can be specified.
a list of parameters for controlling the fitting process. See the documentation for [segmented::seg.control] for details
logical value indicating if the model.frame should be returned
Create an object defining the parameter values for use with the createSegmentedModel.
[segmented::segmented()] which this function wraps its arguments.