Roughness-matrix formula for a natural cubic smoothing spline

ID: roughness-matrix-formula-for-a-natural-cubic-smoothing-spline

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!