EVOLUTION-MANAGER
Edit File: corMatrix.corStruct.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: Matrix of a corStruct Object</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 corMatrix.corStruct {nlme}"><tr><td>corMatrix.corStruct {nlme}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Matrix of a corStruct Object</h2> <h3>Description</h3> <p>This method function extracts the correlation matrix (or its transpose inverse square-root factor), or list of correlation matrices (or their transpose inverse square-root factors) corresponding to <code>covariate</code> and <code>object</code>. Letting <i>S</i> denote a correlation matrix, a square-root factor of <i>S</i> is any square matrix <i>L</i> such that <i>S=L'L</i>. When <code>corr = FALSE</code>, this method extracts <i>L^(-t)</i>. </p> <h3>Usage</h3> <pre> ## S3 method for class 'corStruct' corMatrix(object, covariate, corr, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>an object inheriting from class <code>"<a href="corClasses.html">corStruct</a>"</code> representing a correlation structure.</p> </td></tr> <tr valign="top"><td><code>covariate</code></td> <td> <p>an optional covariate vector (matrix), or list of covariate vectors (matrices), at which values the correlation matrix, or list of correlation matrices, are to be evaluated. Defaults to <code>getCovariate(object)</code>.</p> </td></tr> <tr valign="top"><td><code>corr</code></td> <td> <p>a logical value. If <code>TRUE</code> the function returns the correlation matrix, or list of correlation matrices, represented by <code>object</code>. If <code>FALSE</code> the function returns a transpose inverse square-root of the correlation matrix, or a list of transpose inverse square-root factors of the correlation matrices.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>some methods for this generic require additional arguments. None are used in this method.</p> </td></tr> </table> <h3>Value</h3> <p>If <code>covariate</code> is a vector (matrix), the returned value will be an array with the corresponding correlation matrix (or its transpose inverse square-root factor). If the <code>covariate</code> is a list of vectors (matrices), the returned value will be a list with the correlation matrices (or their transpose inverse square-root factors) corresponding to each component of <code>covariate</code>. </p> <h3>Author(s)</h3> <p>José Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a></p> <h3>References</h3> <p>Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer. </p> <h3>See Also</h3> <p><code><a href="corFactor.corStruct.html">corFactor.corStruct</a></code>, <code><a href="Initialize.corStruct.html">Initialize.corStruct</a></code></p> <h3>Examples</h3> <pre> cs1 <- corAR1(0.3) corMatrix(cs1, covariate = 1:4) corMatrix(cs1, covariate = 1:4, corr = FALSE) # Pinheiro and Bates, p. 225 cs1CompSymm <- corCompSymm(value = 0.3, form = ~ 1 | Subject) cs1CompSymm <- Initialize(cs1CompSymm, data = Orthodont) corMatrix(cs1CompSymm) # Pinheiro and Bates, p. 226 cs1Symm <- corSymm(value = c(0.2, 0.1, -0.1, 0, 0.2, 0), form = ~ 1 | Subject) cs1Symm <- Initialize(cs1Symm, data = Orthodont) corMatrix(cs1Symm) # Pinheiro and Bates, p. 236 cs1AR1 <- corAR1(0.8, form = ~ 1 | Subject) cs1AR1 <- Initialize(cs1AR1, data = Orthodont) corMatrix(cs1AR1) # Pinheiro and Bates, p. 237 cs1ARMA <- corARMA(0.4, form = ~ 1 | Subject, q = 1) cs1ARMA <- Initialize(cs1ARMA, data = Orthodont) corMatrix(cs1ARMA) # Pinheiro and Bates, p. 238 spatDat <- data.frame(x = (0:4)/4, y = (0:4)/4) cs1Exp <- corExp(1, form = ~ x + y) cs1Exp <- Initialize(cs1Exp, spatDat) corMatrix(cs1Exp) </pre> <hr /><div style="text-align: center;">[Package <em>nlme</em> version 3.1-139 <a href="00Index.html">Index</a>]</div> </body></html>