Skip to contents

PCA of random-effects variance-covariance estimates

Usage

rePCA(x)

Arguments

x

a merMod object

Value

a prcomplist 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).

Author

Douglas Bates

See also

References

Examples

  fm1 <- lmer(Reaction~Days+(Days|Subject), sleepstudy)
  rePCA(fm1)
#> $Subject
#> Standard deviations (1, .., p=2):
#> [1] 0.9668680 0.2308798
#> 
#> Rotation (n x k) = (2 x 2):
#>             [,1]        [,2]
#> [1,] -0.99986158 -0.01663769
#> [2,] -0.01663769  0.99986158
#> 
#> attr(,"class")
#> [1] "prcomplist"