View source: R/influence_full.R
| cooks.distance.rlmerMod | R Documentation |
Joint Mahalanobis influence on the fitted (\hat{\beta},
\hat{\sigma}, \hat{\theta}). With groups = NULL (default) the
unit is the observation: the per-observation influence vectors are
stacked into a (p + 1 + L) \times n matrix W, and the
result is \sqrt{w_i^T V^{-1} w_i} with V = (1/n) W W^T.
With groups set the unit is the cluster: the
per-cluster influence functions \Xi = -J_{par}^{-1} S (S
the per-cluster score contributions from .scoreByCluster),
restricted to the (\beta, \sigma, \theta) rows, are scored the
same way with V = (1/J) \Xi \Xi^T. This flags whole-cluster
outliers that no single observation reveals – e.g. before relying on
the bootstrap variance-component test of anova, which
is anti-conservative under group contamination. If V is
singular (a variance-component boundary) the Moore-Penrose
pseudo-inverse is used.
## S3 method for class 'rlmerMod'
cooks.distance(model, groups = NULL, IF = NULL, ...)
model |
An |
groups |
Cluster grouping for cluster-level Cook's distance:
|
IF |
Optional pre-computed |
... |
Currently unused. |
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.
Named numeric vector: one entry per observation
(groups = NULL) or per cluster level.
implicitIF_full,
influence,
hatvalues
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.