[R-sig-ME] Help with coding an intervention analysis with lmer()

Andrew Robinson mensurationist at gmail.com
Sun Aug 29 12:26:28 CEST 2010


>> 
>> If we go back to your original model specification, you had
>> 
>> mod <- lmer(Attack ~ Group*BA + BA/Year + BA/Year:Group +
>> Group/Subject:BA + (1|Group/Subject), data = dat, family = poisson)
>> 
>> in my view that is gobbledygook. You have Group as a fixed effect
>> predictor, but also as a grouping factor, and I don't think that makes
>> any sense.

Just as a general point, there is a case when fixed effect predictor can also appear as a grouping effect: in split-plot designs. Indeed, this occurs in one of the examples in Pinheiro & Bates (2000).  It is a bit unclear in coding, and it would be cleaner if the coder were to create separate factors for the fixed and the random effects, even if they are the same. The algorithms allow the shortcut, though.    

Cheers

Andrew


>>  




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