\Header{pdMatrix}{Extract Matrix or Square-Root Factor from a pdMat Object}
\methalias{pdMatrix.pdBlocked}{pdMatrix}
\methalias{pdMatrix.pdCompSymm}{pdMatrix}
\methalias{pdMatrix.pdDiag}{pdMatrix}
\methalias{pdMatrix.pdIdent}{pdMatrix}
\methalias{pdMatrix.pdMat}{pdMatrix}
\methalias{pdMatrix.pdNatural}{pdMatrix}
\methalias{pdMatrix.pdSymm}{pdMatrix}
\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}{S} denote a
positive-definite matrix, a square-root factor of \eqn{\Sigma}{S} is
any square matrix \eqn{L}{L} such that \eqn{\Sigma = L'L}{S =
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{SeeAlso}\relax
\code{\Link{as.matrix.pdMat}}, \code{\Link{pdFactor}},
\code{\Link{corMatrix}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
pd1 <- pdSymm(diag(1:4))
pdMatrix(pd1)
\end{ExampleCode}
\end{Examples}

