group_vars: Calculates / extracts variance components from random effects...

View source: R/internals.R

group_varsR Documentation

Calculates / extracts variance components from random effects and random slopes

Description

This function uses the method from Paul Johnson to compute the average group variance across the levels of a covariate.

Usage

group_vars(grname, VarComps, mod)

Arguments

grname

The name of a grouping factor, usually accessed by looping over the grname argument of the rptR functions.

VarComps

A list. Output of the lme4::VarCorr function.

mod

An lme4 model object.


rptR documentation built on June 8, 2025, 10:22 a.m.