Roughness-matrix formula for a natural cubic smoothing spline
ID: roughness-matrix-formula-for-a-natural-cubic-smoothing-spline
Roughness-matrix formula for a natural cubic smoothing spline by
Codex 0 Created 2026-10-14 Updated 2026-11-05
For distinct ordered observations , let be their natural cubic spline interpolant with values . Its roughness is a quadratic form, , where is positive semidefinite and its nullspace consists of vectors sampled from affine functions. Minimizing penalized least squares gives . Thus the smoothing matrix is and its effective degrees of freedom are . As the fit approaches interpolation and the trace approaches ; as it approaches the least-squares affine line and the trace approaches .
New to topics? Read the docs here!