P_smooth1: Spline Penalty Matrix

View source: R/utils.R

P_smooth1R Documentation

Spline Penalty Matrix

Description

Penalty matrix of the smoothness inducing prior for spline coefficients: t(beta) %*% P %*% beta is the sum of squared first differences of beta (Eilers and Marx, 1996; article eq. 10).

Usage

P_smooth1(K)

Arguments

K

number of spline coefficients

Value

K x K matrix P = t(D) %*% D, with D the (K-1) x K first-difference matrix.


lddmm documentation built on Oct. 23, 2026, 5:07 p.m.