Learn R Programming

nlme (version 3.1-31)

corMatrix.corStruct: Matrix of a corStruct Object

Description

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 covariate and object. Letting $\Sigma$ denote a correlation matrix, a square-root factor of $\Sigma$ is any square matrix $L$ such that $\Sigma = L'L$. When corr = FALSE, this method extracts $L^{-t}$.

Usage

## S3 method for class 'corStruct':
corMatrix(object, covariate, corr, \dots)

Arguments

Value

If covariate 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 covariate 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 covariate.

See Also

corFactor.corStruct, Initialize.corStruct

Examples

Run this code
cs1 <- corAR1(0.3)
corMatrix(cs1, covariate = 1:4)
corMatrix(cs1, covariate = 1:4, corr = FALSE)

Run the code above in your browser using DataLab