resolveCluster: Resolve a cluster specification for a fitted 'rlmerMod'...

View source: R/influence.R

resolveClusterR Documentation

Resolve a cluster specification for a fitted rlmerMod object.

Description

Used by vcov_sandwich. For a single grouping factor (nested design) the cluster-robust sandwich is exact; for crossed factors no single clustering nests every random-effect block, so a warning is issued and the sandwich is approximate.

Usage

resolveCluster(fit, cluster, n)

Arguments

fit

rlmerMod object.

cluster

NULL (auto-detect: use the sole grouping factor, or error if the design is crossed), a character string naming a grouping factor of the model, or a length-n vector of cluster memberships.

n

Number of observations.

Value

A length-n factor of cluster memberships.


robustlmm documentation built on June 21, 2026, 5:12 p.m.