extracting variance components in lme4?
On 2/6/07, Fabian Scheipl <f.abian at gmx.net> wrote:
try
vc <-VarCorr( model1 )
varcomps<-c(unlist( lapply(vc, diag) ), # random intercept variances
attr(vc,"sc")^2) # residual variance
also works if you have multiple random terms (intercept and slope, e.g.) for a given grouping factor.
Extracts the respective variances without the covariances.
Yes, indeed. That is better than the version that I suggested. Thanks. If a good name for such an extractor can be suggested I will incorporate it in the lme4 package. Any suggestions for a name?