Penalty.matrix {ppls}R Documentation

Penalty Matrix for Higher Order Differences

Description

Computes the block-diagonal penalty matrix penalizing higher-order differences.

Usage

Penalty.matrix(m, order = 2)

Arguments

m

Numeric vector indicating sizes of blocks.

order

Integer indicating the order of differences (default is 2).

Details

For each block of size m[j], and default order = 2, computes:

v^\top P_j v = \sum_{i=3}^{m[j]} (v_i - 2v_{i-1} + v_{i-2})^2.

The final penalty matrix is block-diagonal composed of blocks P_j.

Value

Penalty matrix (numeric matrix) of dimension sum(m) x sum(m).

References

Kraemer, N., Boulesteix, A.-L., & Tutz, G. (2008). Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data. Chemometrics and Intelligent Laboratory Systems, 94, 60-69. https://doi.org/10.1016/j.chemolab.2008.06.009

Examples

P <- Penalty.matrix(c(6, 4), order = 2)


[Package ppls version 2.0.0 Index]