Learn R Programming

lme4 (version 0.999999-2)

VarCorr: Extract variance and correlation components

Description

Extract the estimated variances, standard deviations, and correlations of the random-effects terms in a mixed-effects model, of class mer.

When appropriate, the within-group error variance and standard deviation are also calculated.

Usage

## S3 method for class 'mer':
VarCorr(x, \dots)
## S3 method for class 'merMCMC':
VarCorr(x, type = c("raw", "varcov", "sdcorr", "logs"), ...)

Arguments

x
a fitted model object, usually an object inheriting from class mer.
type
character string indicating the type of result to be returned, either "raw", the raw representation as in the ST slot of the mer class, or "varcov", variances and c
...
Additional, optional arguments for some methods. At present none are used.

Value

  • an object of class VarCorr.

See Also

the lmer function and mer class; the result class VarCorr.

Examples

Run this code
(fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
             data = sleepstudy))
(VC <- VarCorr(fm2))

Run the code above in your browser using DataLab