get_2ndDerivPenalty_wrapper: Wrapper for Integrated Second-Derivative Penalty Computation

View source: R/HelperFunctions.R

get_2ndDerivPenalty_wrapperR Documentation

Wrapper for Integrated Second-Derivative Penalty Computation

Description

Computes the integrated squared second-derivative penalty matrix with optional parallel processing.

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,
  p_expansions,
  parallel,
  cl
)

Arguments

K

Number of partitions (K+1)

colnm_expansions

Column names of basis expansions

C

Basis expansion matrix used to determine observed predictor ranges

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

p_expansions

Number of columns in the basis expansion per partition

parallel

Logical to enable parallel processing

cl

Cluster object for parallel computation

Value

A p \times p integrated squared second-derivative penalty matrix.


lgspline documentation built on May 8, 2026, 5:07 p.m.