Skip to content
Prev 37 / 20628 Next

extracting variance components in lme4?

I was wondering whether anyone knew of a quick way to extract variance 
component from an lmer (or lmer2) model.  I have a random effect nested 
design (with fact2 nested in fact1) that I call as follow

model1<-lmer(resp~1+(1|fact1)+(1|fact2),data=data)

I can obtain the variance components from VarCorr (actually, the 
variance components of fact1 and fact2 only, and the standard deviation 
of the residuals):

vc<-VarCorr(model1)

but then, I can't extract the variance components and store them in a 
simple R object (I could with lme of package nlme).  I need to do that 
for further processing.

Any clues on how I could do it )


Many thanks in advance.