mspline_init {survextrap} | R Documentation |
Create a default M-spline model structure
Description
Create a default M-spline model structure
Usage
mspline_init(
df = 10,
degree = 3,
bsmooth = TRUE,
knots = NULL,
bknot = 10,
obstimes = NULL
)
Arguments
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 |
Value
A list with fundamental components knots
,
degree
, and bsmooth
, as documented above.
The component df
is also included, and derived as a consequence
of the fundamental components.
basis_means
gives the "mean" of each basis term (i.e. the
mean of a random variable whose probability density function is
given by the basis function)
basis_spans
and sqrt_wt
are quantities used in the
construction of random walk prior distributions for the basis
coefficients (following https://arxiv.org/abs/2401.12640 and
https://arxiv.org/abs/2201.06808).