[R-sig-ME] nested or non-nested grouping factors

array chip arrayprofile at yahoo.com
Mon Jul 12 19:26:54 CEST 2010


Dear Dr. Bates,

I have some confusions about how to identify nested or non-nested groups 
factors, and how to fit them in lmer().

In the vignette "Linear mixed model implementation in lme4", you used "Oats" 
data from nlme package as an example for nested grouping factors where "plot" 
grouping factor is nested within the "block" grouping factor, because "A given 
plot occurs in one and only one block". But "plot" factor is actually coded by 
"variety" factor, which I can say that "every variety occurs in every block" 
which seems to mean that "variety" and "block" are crossed. So how in the end 
should I distinguish between nested and crossed grouping factors? Any simple 
rules?

For nested factors (say factor A is nested within factor B), I understand I can 
specify the random effector as (1|B/A). Can I still specify as (1|A)+(1|B)? then 
what's the explanation of these 2 terms?

For non-nested factors, is (1|A)+(1|B) the only way to specify random effects? 
Can I also specify (1|A)+(1|B)+(1|A:B)? So the explanation is  random effects of 
A, B and interaction?

Thank you very much!

John




More information about the R-sig-mixed-models mailing list