PTMCoef#
- class liesel_ptm.PTMCoef(scale, penalty, inference=None, name='', scale_penalty=True, diagonalize_penalty=True, Z=None, role='transformation_coef', noncentered=False)[source]#
Bases:
Var
Coefficient for PTM transformation splines.
This class wraps latent spline coefficients with penalty handling and provides several factory constructors for common penalty/prior setups.
- Parameters:
scale (
Var
) – A scale variable used for the coefficient prior.penalty (
Any
) – Penalty matrix applied to the spline coefficients.
- Z#
Reparameterization matrix applied to latent coefficients.
- penalty#
The (possibly scaled) penalty matrix used for priors.
- latent_coef#
Underlying latent coefficient variable.
- nparam#
Number of spline parameters (after transformations).
Methods
Create a ridge-penalized coefficient set.
Create RW1 coefficients anchored at zero.
Create from-zero RW1 coefficients with an inverse-gamma prior on the variance parameter.
Create RW1 sum-to-zero coefficients with a Weibull prior on the random walk variance.
Create RW1 (first-order random walk) coefficients with sum-to-zero.
Create RW1 sum-to-zero coefficients with an inverse-gamma prior on the random walk variance.
Create RW1 sum-to-zero coefficients with a Weibull prior on the random walk variance.
Attributes