msplinemodel_init | R Documentation |
mspline_init
is first used to create the M-spline
model structure, including knot positions. Parameters including
basis coefficients and scale are either supplied or set to a
default that defines a constant hazard model.
msplinemodel_init(
df = 10,
degree = 3,
bsmooth = TRUE,
knots = NULL,
bknot = 10,
obstimes = NULL,
coefs = NULL,
hscale = 1
)
df |
Desired number of basis terms, or "degrees of freedom"
in the spline. If |
degree |
Spline polynomial degree. Can only be changed from
the default of 3 if |
bsmooth |
If |
knots |
Vector of knot locations. If not supplied, The number of knots (excluding zero) is |
bknot |
Location of the final spline knot. |
obstimes |
Vector of observation times whose quantiles will be used to choose knot locations |
coefs |
Basis coefficients |
hscale |
Hazard scale parameter |
This function is not for fitting models to data, but for setting up a theoretical M-spline model for illustration.
A list defining the M-spline, with any omitted list
components set to defaults. See mspline_init
for
details. The parameters are included as the coefs
and
hscale
components.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.