Does anyone know why when I perform a lmer analysis (here using the builtin sleepstudy dataset) the estimated variance matrix of the random effects from VarCorr are so different from the variance of the estimated random effects (by applying cov to the ranef that extracts random effect) thanks
(fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy))
summary(fm1)
head(data.frame(ranef(fm1)$Subject)) # random effects
data.frame(VarCorr(fm1)) # estimated variance matrix from lmer
cov(data.frame(ranef(fm1)$Subject)) # actuall variances of random effects
matrix(data.frame(VarCorr(fm1))[c(1,3,3,2),4],nc=2) # extracts variance components in same format as cov for comparison