Matrix of a corStruct Object

Usage

corMatrix(object, covariate, corr)

Arguments

object an object inheriting from class corStruct representing a correlation structure.
covariate 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 getCovariate{object}.
corr a logical value. If TRUE the function returns the correlation matrix, or list of correlation matrices, represented by object. If FALSE 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.

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 S denote a correlation matrix, a square-root factor of S is any square matrix L such that S=L'L. When corr = FALSE, this method extracts L^(-t).

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.

Author(s)

Jose Pinheiro and Douglas Bates

See Also

corFactor.corStruct, initialize.corStruct

Examples

library(lme)
cs1 <- corAR1(0.3)
corMatrix(cs1, covariate = 1:4)
corMatrix(cs1, covariate = 1:4, corr = F)


[Package Contents]