Sl.setup {mgcv} | R Documentation |
INTERNAL function for setting up a list representing a block diagonal penalty matrix
from the object produced by gam.setup
.
Sl.setup(G)
G |
the output of |
A list with an element for each block.
For block, b, Sl[[b]]
is a list with the following elements
repara
: should re-parameterization be applied to model matrix, etc?
Usually FALSE
if non-linear in coefficients.
start, stop
: such that start:stop
are the indexes of the parameters of this block.
S
: a list of penalty matrices for the block (dim = stop-start+1
)
If length(S)==1
then this will be an identity penalty.
Otherwise it is a multiple penalty, and an rS
list of square
root penalty matrices will be added. S
(if repara==TRUE
) and rS
(always)
will be projected into range space of total penalty matrix.
rS
: square root of penalty matrices if multiple penalties are used.
D
: a reparameterization matrix for the block. Applies to cols/params in start:stop
.
If numeric then X[,start:stop]%*%diag(D)
is re-parametrization of X[,start:stop]
,
and b.orig = D*b.repara
(where b.orig
is the original parameter vector).
If matrix then X[,start:stop]%*%D
is re-parametrization of X[,start:stop]
,
and b.orig = D%*%b.repara
(where b.orig
is the original parameter vector).
Simon N. Wood <simon.wood@r-project.org>.