Create Design Matrix for Splines
design2design_matrix.Rd
This function generates a design matrix using spline parameters and metadata. It accommodates both B-splines and natural cubic splines based on the provided spline type and parameters.
Arguments
- meta
A dataframe containing the metadata, including the time column.
- spline_params
A list containing the spline parameters. This list can include `dof` (degrees of freedom), `knots`, `bknots` (boundary knots), `spline_type`, and `degree`.
- level_index
An integer representing the current level index for which the design matrix is being generated.
- design
A character string representing the design formula to be used for generating the model matrix.