VarCorr {Matrix} | R Documentation |
Extract the estimated variances, standard
deviations, and correlations of the random-effects terms in a
linear mixed-effects model, of class lme
, or a generalized
linear mixed-effects model. When appropriate,
the within-group error variance and standard deviation are also
calculated.
## S4 method for signature 'mer': VarCorr(x, REML = x@method == "REML", useScale = x@useScale, ...)
x |
a fitted model object, usually an object inheriting from
class lmer .
|
REML |
logical indicating if REML should be used. |
useScale |
logical indicating if a scale should be computed and
used; otherwise sc <- 1 is used. |
... |
Additional, optional arguments for some methods. At present none are used. |
an object of class VarCorr
.
the lmer
function and lmer
class;
the result class VarCorr
.
(fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), data = sleepstudy)) (VC <- VarCorr(fm2))