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.
# S3 method for rlmerMod
vcov(
object,
type = c("default", "sandwich"),
cluster = NULL,
correction = c("G1", "none"),
...
)A \(p \times p\) covariance matrix for \(\hat{\beta}\).
An rlmerMod object.
"default" (the lme4-inherited linearised vcov; the
pre-existing behaviour) or "sandwich" (the robust
cluster-sandwich).
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.
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").
The cluster sandwich is exact for a single (nested) grouping factor;
for crossed factors it is approximate (a warning is issued, see
vcov_sandwich).
Small-J caveat for the sandwich. The G1 correction is
necessary but not sufficient at very small \(J\): in a
simulation study sandwich CI coverage drops to ~0.89 at \(J =
8\) (vs. nominal 0.95). vcov_sandwich emits a warning for
\(J < 20\); for inference at small \(J\) prefer type =
"default" or pair the sandwich CI with a bootstrap calibration
(e.g. confintROB).
vcov_sandwich