\HeaderA{VarCorr}{Extract variance and correlation components}{VarCorr}
\aliasA{print.VarCorr.lme}{VarCorr}{print.VarCorr.lme}
\aliasA{summary.VarCorr.lme}{VarCorr}{summary.VarCorr.lme}
\methaliasA{VarCorr.lme}{VarCorr}{VarCorr.lme}
\methaliasA{VarCorr.pdBlocked}{VarCorr}{VarCorr.pdBlocked}
\methaliasA{VarCorr.pdMat}{VarCorr}{VarCorr.pdMat}
\keyword{models}{VarCorr}
\begin{Description}\relax
This function calculates the estimated variances, standard
deviations, and correlations between the random-effects terms in a
linear mixed-effects model, of class \code{lme}, or a nonlinear
mixed-effects model, of class \code{nlme}. The within-group error
variance and standard deviation are also calculated.
\end{Description}
\begin{Usage}
\begin{verbatim}
VarCorr(x, sigma, rdig)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a fitted model object, usually an object inheriting from
class \code{lme}. 

\item[\code{sigma}] an optional numeric value used as a multiplier for the
standard deviations. Default is \code{1}.

\item[\code{rdig}] an optional integer value specifying the number of digits
used to represent correlation estimates. Default is \code{3}.

\end{ldescription}
\end{Arguments}
\begin{Value}
a matrix with the estimated variances, standard deviations, and
correlations for the random effects. The first two columns, named
\code{Variance} and \code{StdDev}, give, respectively, the variance
and the standard deviations. If there are correlation components in
the random effects model, the third column, named \code{Corr},
and the remaining unnamed columns give the estimated correlations
among random effects within the same level of grouping. The
within-group error variance and standard deviation are included as
the last row in the matrix.
\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. pp. 100, 461.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{lme}{lme}}, \code{\LinkA{nlme}{nlme}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
fm1 <- lme(distance ~ age, data = Orthodont, random = ~age)
VarCorr(fm1)
\end{ExampleCode}
\end{Examples}

