Learn R Programming

tramME (version 1.0.1)

VarCorr.LmME: Variances and correlation matrices of random effects of an LmME object

Description

The returned parameters are the transformed versions of the original parameters that correspond to the normal linear mixed model parametrization.

Usage

# S3 method for LmME
VarCorr(x, sigma = 1, as.lm = FALSE, ...)

Arguments

x

An LmME object.

sigma

Standard deviation of the error term in the LMM parametrization (should not be set manually, only for consistency with the generic method)

as.lm

If TRUE, return the variances and correlations that correspond to a normal linear mixed model (i.e. lmerMod).

...

Optional arguments (for consistency with generic)

Value

A list of vectors with variances and correlation matrices corresponding to the various grouping variables.

Details

The function only returns the correlation matrices that belong to actual random effects (defined for groups in the data) and ignores the random effects parameters of the smooth shift terms. To extract these, the user should use varcov with full = TRUE.

Examples

Run this code
# NOT RUN {
data("sleepstudy", package = "lme4")
fit <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
VarCorr(fit) ## tranformation model parametrization
VarCorr(fit, as.lm = TRUE) ## LMM parametrization
# }

Run the code above in your browser using DataLab