get_2ndDerivPenalty_wrapper {lgspline} | R Documentation |
Wrapper for Smoothing Spline Penalty Computation
Description
Computes smoothing spline penalty matrix with optional parallel processing.
Calls get_2ndDerivPenalty
after
processing spline vs. nonspline terms and preparing for parallel if desired.
Usage
get_2ndDerivPenalty_wrapper(
K,
colnm_expansions,
C,
power1_cols,
power2_cols,
power3_cols,
power4_cols,
interaction_single_cols,
interaction_quad_cols,
triplet_cols,
nonspline_cols,
nc,
parallel,
cl
)
Arguments
K |
Number of partitions ( |
colnm_expansions |
Column names of basis expansions |
C |
Basis expansion matrix of two rows, first of all maximums, second of all minimums, for all variables of interest = |
power1_cols |
Linear term columns |
power2_cols |
Quadratic term columns |
power3_cols |
Cubic term columns |
power4_cols |
Quartic term columns |
interaction_single_cols |
Single interaction columns |
interaction_quad_cols |
Quadratic interaction columns |
triplet_cols |
Triplet interaction columns |
nonspline_cols |
Predictors not treated as spline effects |
nc |
Number of cubic expansions |
parallel |
Logical to enable parallel processing |
cl |
Cluster object for parallel computation |
Value
A p \times p
penalty matrix for smoothing spline regularization containing the
elementwise sum of the integrated squared second derivative of the fitted
function with respect to predictors of interest.
Function is exported for reference purposes - use at your own risk!