formXtViX {mgcv} | R Documentation

## Form component of GAMM covariance matrix

### Description

This is a service routine for `gamm`. Given, V, an estimated covariance matrix obtained using `extract.lme.cov2` this routine forms X'inv(V)X as efficiently as possible, given the structure of V (usually sparse).

### Usage

    formXtViX(V,X)

### Arguments

`V` | A data covariance matrix list returned from `extract.lme.cov2`
`X` | A model matrix.

### Details

The covariance matrix returned by `extract.lme.cov2` may be in a packed and re-ordered format, since it is usually sparse. Hence a special service routine is required to form the required products involving this matrix.

### Value

A matrix.

### Author(s)

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

### References

For `lme` see:

Pinheiro J.C. and Bates, D.M. (2000) Mixed effects Models in S and S-PLUS. Springer

For details of how GAMMs are set up here for estimation using `lme` see:

Wood, S.N. (2006) Low rank scale invariant tensor product smooths for Generalized Additive Mixed Models. Biometrics

http://www.maths.bath.ac.uk/~sw283/

### See Also

`gamm`, `extract.lme.cov2`

[Package mgcv version 1.3-17 Index]