Sl.setup {mgcv} | R Documentation |
Setting up a list representing a block diagonal penalty matrix
Description
INTERNAL function for setting up a list representing a block diagonal penalty matrix
from the object produced by gam.setup
.
Usage
Sl.setup(G,cholesky=FALSE,no.repara=FALSE,sparse=FALSE)
Arguments
G |
the output of |
cholesky |
re-parameterize using Cholesky only. |
no.repara |
set to |
sparse |
sparse setup? |
Value
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? UsuallyFALSE
if non-linear in coefficients.start, stop
: such thatstart:stop
are the indexes of the parameters of this block.S
: a list of penalty matrices for the block (dim = stop-start+1
) Iflength(S)==1
then this will be an identity penalty. Otherwise it is a multiple penalty, and anrS
list of square root penalty matrices will be added.S
(ifrepara==TRUE
) andrS
(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 instart:stop
. If numeric thenX[,start:stop]%*%diag(D)
is re-parametrization ofX[,start:stop]
, andb.orig = D*b.repara
(whereb.orig
is the original parameter vector). If matrix thenX[,start:stop]%*%D
is re-parametrization ofX[,start:stop]
, andb.orig = D%*%b.repara
(whereb.orig
is the original parameter vector).
Author(s)
Simon N. Wood <simon.wood@r-project.org>.