Learn R Programming

refund (version 0.1-40)

sample_pspline_coef_1d: Sample coefficients from 1D P-spline prior

Description

Samples coefficients from \(N(0, P^{-1})\) where \(P = (1/\mathrm{wiggliness}) \cdot K'K + I\) and \(K\) is a 2nd-order difference matrix.

Usage

sample_pspline_coef_1d(k, wiggliness)

Value

Numeric vector of coefficients (length k).

Arguments

k

Number of basis functions.

wiggliness

Controls smoothness. Higher = more wiggly.