[R-sig-ME] random effects specification
Sebastian P. Luque
spluque at gmail.com
Thu Apr 3 22:45:33 CEST 2008
Hi,
In the past I've used lme to fit simple mixed models to longitudinal
data (growth), but now I'm trying to learn lmer and its different syntax
to fit a more complex model. I have a structure with subjects (id,
random factor) exposed to 4 different treatments and a continuous
response variable is measured (n). The subjects come from 2 different
communities, so it's a nested design very much like the Oats data in the
nlme package. The interest is in the fixed effects of community and
treatment, and their interaction, so I thought this could be modelled in
lmer with this call:
lmer(n ~ treatment + community + (1 | id/treatment), mydata)
but got this error:
Error in lmerFactorList(formula, mf, fltype) :
number of levels in grouping factor(s) ‘treatment:id’ is too large
Am I using the right formula here? Thanks.
--
Seb
More information about the R-sig-mixed-models
mailing list