[R-sig-ME] interaction between random effects

Gustavo Betini betinig at uoguelph.ca
Fri Aug 26 10:34:01 CEST 2011


Hi all, 

lets say that in the sleepstudy data drivers were measured while sleeping in rooms with another driver. The study was conducted in two different years, and each year drivers were allowed to choose their own partner (they usually changed their partner in the second year). Drivers are not necessarily the same in different years. I want to control for potential effects of the interaction between drivers. What is the correct specification? 

fm1 <- lmer(Reaction ~ 1 + Days + (1 + Days|Subject)+(1|partner_ID), sleepstudy) 

fm2 <- lmer(Reaction ~ 1 + Days + (1 + Days|partner_ID:Subject), sleepstudy) 

fm3 <- lmer(Reaction ~ 1 + Days + (1 + Days|Subject)+(1|partner_ID:Subject), sleepstudy) 


Thanks, 

Gustavo S. Betini, PhD candidate 
Dept of Integrative Biology 
University of Guelph 
Canada




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