Constructs constraint matrix \(\textbf{A}\) enforcing continuity and smoothness at knot boundaries by constraining function values, derivatives, and interactions between partitions.
make_constraint_matrix(
nc,
CKnots,
power1_cols,
power2_cols,
nonspline_cols,
interaction_single_cols,
interaction_quad_cols,
triplet_cols,
K,
include_constrain_fitted,
include_constrain_first_deriv,
include_constrain_second_deriv,
include_constrain_interactions,
include_2way_interactions,
include_3way_interactions,
include_quadratic_interactions,
colnm_expansions,
expansion_scales
)
Matrix \(\textbf{A}\) of constraint coefficients. Columns correspond to constraints, rows to coefficients across all \(K+1\) partitions.
Integer; number of columns in basis expansion
Matrix; basis expansions evaluated at knot points
Integer vector; indices of linear terms
Integer vector; indices of quadratic terms
Integer vector; indices of non-spline terms
Integer vector; indices of linear interaction terms
Integer vector; indices of quadratic interaction terms
Integer vector; indices of three-way interaction terms
Integer; number of interior knots (\(K+1\) partitions)
Logical; constrain function values at knots
Logical; constrain first derivatives at knots
Logical; constrain second derivatives at knots
Logical; constrain interaction terms at knots
Logical; include two-way interactions
Logical; include three-way interactions
Logical; include quadratic interactions
Character vector; column names for basis expansions
Numeric vector; scaling factors for standardization