[R] formula in lmer including both nested and crossed effects

Eduardo G. Martins egmartins at gmail.com
Wed Nov 19 20:44:05 CET 2008


Dear all,

I was wondering if someone could help me with the specification of a
formula including both nested and crossed effects in the same model in
lmer. I have one predictor variable, x, and three grouping factors,
a,b and c. Factor b is nested in a but is partially crossed with c.
Also, I'm interested in an interaction between the crossed effects b
and c. I specified a formula in lmer as

y ~ x + (1|a/b) + (1|c) + (1|b:c)

I could fit this model using lmer with no problems but I just would
like to know if that specification is correct. Thank you so much for
any thoughts.

Eduardo



More information about the R-help mailing list