vcov.rlmerMod: Variance-covariance matrix of the fixed effects of an...

View source: R/fromLme4.R

vcov.rlmerModR Documentation

Variance-covariance matrix of the fixed effects of an rlmerMod fit.

Description

By default returns the same object as lme4's vcov.merMod (the linearised model-based covariance). With type = "sandwich", returns the robust cluster-sandwich vcov_sandwich.

Usage

## S3 method for class 'rlmerMod'
vcov(
  object,
  type = c("default", "sandwich"),
  cluster = NULL,
  correction = c("G1", "none"),
  ...
)

Arguments

object

An rlmerMod object.

type

"default" (the lme4-inherited linearised vcov; the pre-existing behaviour) or "sandwich" (the robust cluster-sandwich).

cluster

When type = "sandwich", passed to vcov_sandwich: NULL (auto-detect for a single grouping factor), a character string naming a grouping factor of the model, or a length-n vector of cluster memberships.

correction

When type = "sandwich", "G1" (default, applies the J/(J-1) small-sample scaling) or "none".

...

Additional arguments passed to the default vcov method (only used when type = "default").

Details

The cluster sandwich is exact for a single (nested) grouping factor; for crossed factors it is approximate (a warning is issued, see vcov_sandwich).

Value

A p \times p covariance matrix for \hat{\beta}.

See Also

vcov_sandwich


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