Sl.setup: Setting up a list representing a block diagonal penalty...

View source: R/fast-REML.r

Sl.setupR 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 gam.setup.

cholesky

re-parameterize using Cholesky only.

no.repara

set to TRUE to turn off all initial reparameterization.

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? 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).

Author(s)

Simon N. Wood <simon.wood@r-project.org>.


mgcv documentation built on May 29, 2024, 4:34 a.m.