Hi,
I need to use the packages lmer and RLRsim in some code. I need to extract the interclass correlation and I would use the following lines

growdat=data.frame(individual=rep(rep(1:8),3), growth=rep(rnorm(8, mean=0, sd=2),3)+rnorm(3*8, sd=1))
mod1=lmer(growth~(1|individual), data=growdat)
ind_var=attr(VarCorr(mod1)$individual,"stddev")^2
res_var=attr(VarCorr(mod1),"sc")^2

but this causes the error
Error in UseMethod("VarCorr") : 
 no applicable method for 'VarCorr' applied to an object of class "mer"
Calls: VarCorr
Execution halted

because loading RLRsim masked the function VarCorr. 
Is there an alternative way to get these elements out of the mer object?
Extracting them before loading RLRsim isn't an option because the model fits and info extraction are in a big loop for replication.

thanks,
Mollie

Mollie Brooks
Ph.D. Candidate
NSF IGERT Fellow
Biology Department
University of Florida
mbrooks@ufl.edu
www.zoology.ufl.edu/mbrooks




	[[alternative HTML version deleted]]


