This function makes a list object containing all of the information to fit splines to continuous data.
Arguments
- data
Data frame containing columns of covariates listed in
varlist
. Column names must match with names invarlist
- varlist
Vector of variable names for the covariates of interest
- predictionData
Data frame containing columns of covariates listed in
varlist
. Column names must match with those invarlist
. This parameter is used to find the maximum range of covariates between the data and prediction data. IfpredictionData
isNULL
then the range of the data is used.- degree
Vector specifying the degree of the spline. If unspecified, degree 2 is stored.
Details
The information is stored in list slots [[2]]
and onward (slot [[1]]
is reserved for a spatial term). Specifically:
covar
. Name of covariate.
explanatory
. Vector of covariate data.
knots
. Knot(s) for spline fitting. This function initialises with a knot at the mean covariate value.
bd
. This specifies the boundary knots. If predictionData
is NULL
then this is the range of the covariate data. Otherwise, the boundary knots are the maximum combined range of the data and prediction data.
degree
. The degree of a B-spline. This function retuns 2 by default.
See runSALSA2D
for details on the spatial slot ([[1]]
)