cooks.distance.rlmerMod: Per-observation Cook's-distance equivalent for an rlmerMod...

View source: R/influence_full.R

cooks.distance.rlmerModR Documentation

Per-observation Cook's-distance equivalent for an rlmerMod fit.

Description

Joint Mahalanobis influence of each observation on the fitted (\hat{\beta}, \hat{\sigma}, \hat{\theta}). Stacks the per- observation influence vectors into a (p + 1 + L) \times n matrix, computes the empirical variance V = (1/n) IF\,IF^T, and returns \sqrt{x_i^T V^{-1} x_i} per observation. If V is singular (variance-component boundary), the Moore-Penrose pseudo-inverse is used.

Usage

## S3 method for class 'rlmerMod'
cooks.distance(model, IF = NULL, ...)

Arguments

model

An rlmerMod object.

IF

Optional pre-computed implicitIF_full(model); computed on demand if NULL.

...

Currently unused.

Details

The full IF computation is the expensive part; pre-compute it once via IF = implicitIF_full(fit) and pass it in if you need cooks.distance and influence together.

Value

Numeric vector of length n.

See Also

implicitIF_full, influence


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