VarCorr: Extract variance and correlation components
Description
This function calculates the estimated variances, standard
deviations, and correlations between the random-effects terms in a
linear mixed-effects model, of class lme
, or a nonlinear
mixed-effects model, of class nlme
. The within-group error
variance and standard deviation are also calculated.Usage
VarCorr(x, sigma, rdig)
Value
a matrix with the estimated variances, standard deviations, and
correlations for the random effects. The first two columns, named
Variance
and StdDev
, give, respectively, the variance
and the standard deviations. If there are correlation components in
the random effects model, the third column, named 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.See Also
lme
, nlme
.
data(Orthodont)
fm1 <- lme(distance ~ age, data = Orthodont, random = ~age)
VarCorr(fm1)
models