\Header{corMatrix.corStruct}{Matrix of a corStruct Object}
\alias{corMatrix.compSymm}{corMatrix.corStruct}
\alias{corMatrix.corAR1}{corMatrix.corStruct}
\alias{corMatrix.corARMA}{corMatrix.corStruct}
\alias{corMatrix.corCAR1}{corMatrix.corStruct}
\alias{corMatrix.corCompSymm}{corMatrix.corStruct}
\alias{corMatrix.corIdent}{corMatrix.corStruct}
\alias{corMatrix.corNatural}{corMatrix.corStruct}
\alias{corMatrix.corSpatial}{corMatrix.corStruct}
\alias{corMatrix.corSymm}{corMatrix.corStruct}
\keyword{models}{corMatrix.corStruct}
\begin{Description}\relax
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} and \code{object}. Letting \eqn{\Sigma}{S} denote
a correlation matrix, a square-root factor of \eqn{\Sigma}{S} is
any square matrix \eqn{L}{} such that \eqn{\Sigma =  L'L}{S=L'L}. When
\code{corr = FALSE}, this method extracts \eqn{L^{-t}}{L^(-t)}.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'corStruct':
corMatrix(object, covariate, corr, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{corStruct}
representing a correlation structure.
\item[\code{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
\code{getCovariate(object)}.
\item[\code{corr}] a logical value. If \code{TRUE} the function returns the
correlation matrix, or list of correlation matrices, represented by
\code{object}. If \code{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.
\item[\code{...}] some methods for this generic require additional
arguments.  None are used in this method.
\end{ldescription}
\end{Arguments}
\begin{Value}
If \code{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 \code{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 \code{covariate}.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{corFactor.corStruct}}, \code{\Link{Initialize.corStruct}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cs1 <- corAR1(0.3)
corMatrix(cs1, covariate = 1:4)
corMatrix(cs1, covariate = 1:4, corr = FALSE)
\end{ExampleCode}
\end{Examples}

