EVOLUTION-MANAGER
Edit File: formXtViX.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Form component of GAMM covariance matrix</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for formXtViX {mgcv}"><tr><td>formXtViX {mgcv}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Form component of GAMM covariance matrix</h2> <h3>Description</h3> <p> This is a service routine for <code><a href="gamm.html">gamm</a></code>. Given, <i>V</i>, an estimated covariance matrix obtained using <code><a href="extract.lme.cov.html">extract.lme.cov2</a></code> this routine forms a matrix square root of <i>X'inv(V)X</i> as efficiently as possible, given the structure of <i>V</i> (usually sparse). </p> <h3>Usage</h3> <pre> formXtViX(V,X) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>V</code></td> <td> <p> A data covariance matrix list returned from <code><a href="extract.lme.cov.html">extract.lme.cov2</a></code></p> </td></tr> <tr valign="top"><td><code>X</code></td> <td> <p> A model matrix.</p> </td></tr> </table> <h3>Details</h3> <p> The covariance matrix returned by <code><a href="extract.lme.cov.html">extract.lme.cov2</a></code> 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. </p> <h3>Value</h3> <p> A matrix, R such that <code>crossprod(R)</code> gives <i>X'inv(V)X</i>. </p> <h3>Author(s)</h3> <p> Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a></p> <h3>References</h3> <p>For <code>lme</code> see: </p> <p>Pinheiro J.C. and Bates, D.M. (2000) Mixed effects Models in S and S-PLUS. Springer </p> <p>For details of how GAMMs are set up for estimation using <code>lme</code> see: </p> <p>Wood, S.N. (2006) Low rank scale invariant tensor product smooths for Generalized Additive Mixed Models. Biometrics 62(4):1025-1036 </p> <p><a href="http://www.maths.bris.ac.uk/~sw15190/">http://www.maths.bris.ac.uk/~sw15190/</a> </p> <h3>See Also</h3> <p><code><a href="gamm.html">gamm</a></code>, <code><a href="extract.lme.cov.html">extract.lme.cov2</a></code> </p> <h3>Examples</h3> <pre> require(mgcv) library(nlme) data(ergoStool) b <- lme(effort ~ Type, data=ergoStool, random=~1|Subject) V1 <- extract.lme.cov(b, ergoStool) V2 <- extract.lme.cov2(b, ergoStool) X <- model.matrix(b, data=ergoStool) crossprod(formXtViX(V2, X)) t(X) </pre> <hr /><div style="text-align: center;">[Package <em>mgcv</em> version 1.8-28 <a href="00Index.html">Index</a>]</div> </body></html>