\Header{pdMatrix.reStruct}{Extract Matrix or Square-Root Factor from Components of an
reStruct Object}
\keyword{models}{pdMatrix.reStruct}
\begin{Description}\relax
This method function extracts the positive-definite  matrices
corresponding to the \code{pdMat} elements of \code{object}, or
square-root factors of the positive-definite matrices.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'reStruct':
pdMatrix(object, factor)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{reStruct},
representing a random effects structure and consisting of a list of
\code{pdMat} objects.
\item[\code{factor}] an optional logical value. If \code{TRUE}, square-root
factors of the positive-definite matrices represented by the elements
of \code{object} are returned; else, if \code{FALSE}, the
positive-definite matrices are returned. Defaults to \code{FALSE}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a list with components given by the positive-definite matrices
corresponding to the elements of \code{object}, or square-root factors
of the positive-definite matrices.
\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.reStruct}}, \code{\Link{reStruct}},
\code{\Link{pdMatrix.pdMat}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(Orthodont)
rs1 <- reStruct(pdSymm(diag(3), ~age+Sex, data = Orthodont))
pdMatrix(rs1)
\end{ExampleCode}
\end{Examples}

