Compute First and Second Derivative Matrices
make_derivative_matrix(
nc,
Cpredictors,
power1_cols,
power2_cols,
nonspline_cols,
interaction_single_cols,
interaction_quad_cols,
triplet_cols,
K,
include_2way_interactions,
include_3way_interactions,
include_quadratic_interactions,
colnm_expansions,
expansion_scales,
just_first_derivatives = FALSE,
just_spline_effects = TRUE
)
List containing first and second derivative matrices
Number of columns
Predictor matrix
Indices of linear terms of spline effects
Indices of quadratic terms of spline effects
Indices of non-spline effects
Indices of first-order interactions
Indices of quadratic interactions
Indices of three-way interactions
Number of partitions minus 1 (\(K\))
Include 2-way interactions
Include 3-way interactions
Include quadratic interactions
Column names
Scale factors
Only compute first derivatives
Only compute derivatives for spline effects