| Penalty.matrix {ppls} | R Documentation |
This function computes a penalty matrix penalizing the higher order differences.
Penalty.matrix(m,order = 2)
m |
A numeric vector. The jth entry gives the size of the jth block in the penalty term. |
order |
The order of the differences. Default value is order=2. |
For the jth entry of the vector m, and for the default values order=2, the penalty
matrix P_j of size m[j] x m[j] penalizes the second order
differences of a vector v of length m[j], that is
v^T P_j v= sum_{i=3} ^{m[j]} (Delta v_i) ^2,
where
Delta v_i= v_i -2 v_{i-1} + v_{i-2}
is the second order difference. This definition is easily extended to
other values of order. The final penalty matrix P is a
block-diagonal matrix with the jth block equal to P_j. More
details can be found in Kraemer, Boulesteix and Tutz (2007).
The penalty matrix of size sum(m) x sum(m)
All entries of the vector m must be larger than
order, as the notion of kth order differences does not make
sense for vectors of length <= k.
Nicole Kraemer
N. Kraemer, A.-L. Boulesteix, G. Tutz (2007) "Penalized Partial Least Squares with Applications to B-Splines Transformations and Functional Data", preprint
available at http://ml.cs.tu-berlin.de/~nkraemer/publications.html
C. de Boor (1978) "A practical guide to splines", Springer.
P<-Penalty.matrix(c(6,4),2) # a more detailed example can be found under penalized.pls()