\HeaderA{pdMatrix}{Extract Matrix or Square-Root Factor from a pdMat Object}{pdMatrix}
\methaliasA{pdMatrix.pdBlocked}{pdMatrix}{pdMatrix.pdBlocked}
\methaliasA{pdMatrix.pdCompSymm}{pdMatrix}{pdMatrix.pdCompSymm}
\methaliasA{pdMatrix.pdDiag}{pdMatrix}{pdMatrix.pdDiag}
\methaliasA{pdMatrix.pdIdent}{pdMatrix}{pdMatrix.pdIdent}
\methaliasA{pdMatrix.pdMat}{pdMatrix}{pdMatrix.pdMat}
\methaliasA{pdMatrix.pdNatural}{pdMatrix}{pdMatrix.pdNatural}
\methaliasA{pdMatrix.pdSymm}{pdMatrix}{pdMatrix.pdSymm}
\keyword{models}{pdMatrix}
\begin{Description}\relax
The positive-definite matrix represented by \code{object}, or a
square-root factor of it is obtained. Letting \eqn{\Sigma}{} denote a
positive-definite matrix, a square-root factor of \eqn{\Sigma}{} is
any square matrix \eqn{L}{} such that \eqn{\Sigma = L'L}{}. This function extracts \eqn{S}{} or \eqn{L}{}.
\end{Description}
\begin{Usage}
\begin{verbatim}
pdMatrix(object, factor)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{pdMat}, representing
a positive definite matrix.
\item[\code{factor}] an optional logical value. If \code{TRUE}, a square-root
factor of the positive-definite matrix represented by \code{object}
is returned; else, if \code{FALSE}, the positive-definite matrix is
returned. Defaults to \code{FALSE}.
\end{ldescription}
\end{Arguments}
\begin{Value}
if \code{fact} is \code{FALSE} the positive-definite matrix
represented by \code{object} is returned; else a square-root of the
positive-definite matrix is returned.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{References}\relax
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models
in S and S-PLUS", Springer, esp. p. 162.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{as.matrix.pdMat}{as.matrix.pdMat}},
\code{\LinkA{pdClasses}{pdClasses}},
\code{\LinkA{pdFactor}{pdFactor}},
\code{\LinkA{pdMat}{pdMat}},
\code{\LinkA{pdMatrix.reStruct}{pdMatrix.reStruct}},
\code{\LinkA{corMatrix}{corMatrix}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
pd1 <- pdSymm(diag(1:4))
pdMatrix(pd1)
\end{ExampleCode}
\end{Examples}

