[R-sig-ME] Minimum number of levels for mixed model
Ben Bolker
bbolker at gmail.com
Fri Feb 8 04:46:38 CET 2013
nrm2010 <nrm2010 at ...> writes:
>
> Dear Mixed Modelers:
> The oft-mentioned glmm wiki FAQ recommends a minimum of 5 or 6
> levels when using a mixed model. I am not sure how to interpret
> this statement. I have 4 experimental treatments, each with 3
> replicates, for a total of 12 plots. Measurements were made over 4
> years and there are thousands of individual data points within each
> of the 12 plots. I was planning to use nested random effects of
> plot within treatment within year. So I would have 3 replicate
> plots within each of 4 treatments within each of 4 years.
> My questions:
> For nested effects, at what level does the recommendation pertain?
> Is it only the lowest level? Would 5 or 6 plots within 3 treatments
> within 3 years be acceptable? Or should one have 5 or 6 plots
> within 5 or 6 treatments within 5 or 6 years? Is the amount of data
> within plot irrelevant to this issue?
> If 4 treatments are insufficient for a mixed model, is treatment as
> fixed effect the only alternative? I need an approach for which
> there is a method for multiple comparison of means. I believe lm,
> lme, lme4 are the only options since the aov methods do not accept
> an Error term.
I would suggest
~ treat*year + [other covariates] + (1|treat:year:rep)
It's hard to imagine why you wouldn't want to model treatment
as a fixed effect in any case. It might be nice to model
year as a fixed effect, but it's not practical (unless you want
to do something fancy like putting a Bayesian prior on the
variance).
You might consider adding a term (1|treat:rep) as well (this
would have an effective sample size of 12), to model persistent
differences among plots within treatments.
It might be a good idea to follow the advice of Murtaugh 2007
(Ecology), and aggregate (take the mean of) all the points within
each treat:year:rep combination. Your model will simplify to
~ treat*year + ... + (1|treat:rep)
because the (1|year:treat:rep) term will be equivalent to
the residual error term. All you will lose will be the estimate
of the variance within (1|treat:rep:year) combinations.
More information about the R-sig-mixed-models
mailing list