Skip to content
Prev 44601 / 398528 Next

A question on lme in R

Hi, everyone,

I have a question on using lme on a mixed effects model with nested 
error structure. After applying lme to the data, and put the outcome in, 
say TR.lme. I can extract the fixed effects by TR.lme$coef$fixed. 
However, when I use TR.lme$coef$random.effects, it does not give the 
variance components that I need, but a vector of values at each nested 
level. What I want are the estimated variance components that show up 
with summary(TR.lme), but I can not extract them from TR.lme.

Could you please give any suggestion? I have tried ranef( ), but it 
seems not to be the right function.

Thank you very much!

Zonghui