| 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? UsuallyFALSEif non-linear in coefficients.start, stop: such thatstart:stopare the indexes of the parameters of this block.S: a list of penalty matrices for the block (dim = stop-start+1) Iflength(S)==1then this will be an identity penalty. Otherwise it is a multiple penalty, and anrSlist 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.origis the original parameter vector). If matrix thenX[,start:stop]%*%Dis re-parametrization ofX[,start:stop], andb.orig = D%*%b.repara(whereb.origis the original parameter vector).
Author(s)
Simon N. Wood <simon.wood@r-project.org>.