[R-sig-ME] extracting variance components in lme4?
Fabian Scheipl
f.abian at gmx.net
Tue Feb 6 14:08:32 CET 2007
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.
HTH,
Fabian Scheipl
--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
More information about the R-sig-mixed-models
mailing list