rePCA: PCA of random-effects covariance matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rePCA.R

Description

PCA of random-effects variance-covariance estimates

Usage

1
rePCA(x)

Arguments

x

a merMod object

Details

Perform a Principal Components Analysis (PCA) of the random-effects variance-covariance estimates from a fitted mixed-effects model. This allows the user to detect and diagnose overfitting problems in the random effects model (see Bates et al. 2015 for details).

Value

a prcomplist object

Author(s)

Douglas Bates

References

See Also

isSingular

Examples

1
2
  fm1 <- lmer(Reaction~Days+(Days|Subject), sleepstudy)
  rePCA(fm1)

Example output

Loading required package: Matrix
$Subject
Standard deviations (1, .., p=2):
[1] 0.9668590 0.2308795

Rotation (n x k) = (2 x 2):
            [,1]        [,2]
[1,] -0.99986158 -0.01663786
[2,] -0.01663786  0.99986158

attr(,"class")
[1] "prcomplist"

lme4 documentation built on June 22, 2021, 9:07 a.m.