How to get covariance matrix for random effects (BLUPs/conditional modes) from lme4
So, I've fitted a linear mixed model with two random intercepts in R: Y = X beta + Z b + e_i, where b ~ MVN (0, Sigma) ; X and Z are the fixed- and random-effects model matrices respectively, and beta and b are the fixed-effect parameters and random-effects BLUPs/conditional modes. I would like to get my hands on the underlying covariance matrix of b , which doesn't seem to be a trivial thing in lme4 package. You can get only the variances by VarCorr , not the actual correlation matrix. According to one of the package vignettes (page 2), you can calculate the covariance of beta: e_i * lambda *