[R-sig-ME] fixed or random effects?

Ben Bolker bbolker at gmail.com
Mon Oct 1 21:24:10 CEST 2012

joana martelo <jmmartelo at ...> writes:

> Hello R list
> I'm modeling fish activity data with a gaussian distribution for scores
> obtained from Principal Component Analysis, and have a little problem,
> hopefully simple to resolve. My explanatory variables are group size, fish
> length and temperature and I sampled in two consecutive years, in spring. My
> problem is that I'm not sure whether I should consider year as a random or a
> fixed effect. I wonder if you could help me.


  As hinted in private e-mail, http://glmm.wikidot.com/faq tells you that
while you may *philosophically* want to treat two years as a sample from
a larger population of years, it is not computationally practical 
(nor will it get you much in terms of inferential power) to treat a factor
with only two levels as random: you should make it fixed.  This then has
the added advantage that you have only fixed effects, and you can use
lm() instead of getting into any of the complexities of mixed models.

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