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

View source: R/LmME.R

VarCorr.LmMER Documentation

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 class '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)

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.

Value

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

Examples

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

tramME documentation built on July 9, 2023, 7:10 p.m.