I have results from an experiment where seeds from 3 source populations (fixed factor 'Source') were transplanted into 4 sites (fixed factor 'site') in 3 different years (factor with levels 2011,2012,2013). I measured the proportion of seeds to emerge per plot (a binomial response variable: propEm).

The problem is that one site was only planted in 2011, so site and year are not fully crossed, so I cannot run a single fixed effect model:

glm(propEm ~ site*Source*year, family=binomial)   

I have been analysing the data in 2 fixed-effect models, one for 2011-2013 for the sites that were planted each year, and one for 2011 with all four sites. But since I don't care about the effect of year per se (just that the effects of site and Source varied among years), I'm wondering whether it would be appropriate to use a single mixed model using glmer:

glmer(propEm ~ site*Source + (1+site|year) + (1+Source|year), family=binomial)    

My questions as someone brought up in the fixed effect world:

  1. In the mixed model above, is it problematic the the factors site and year are not fully crossed?

  2. 3 years is not really a random sample of years, and yet it is in that I didn't choose these years specifically (that's just when my dissertation was done) and don't really care about their means. Does year in this case seem like an appropriate random effect?


year should not be random here because you have only 3 levels of it. Just because you "don't really care about their means" is not a reason for modelling it as a random effect. Remember that by specifying random effects, you are saying that these come from a normally distributed population - but with only 3 observations from this population you can't expect a reasonable variance estimate. By including it as a fixed effect you will control for non-independence of measurements within each year, while benefiting from the higher overall sample size (as compared to running models for each year), and that's what random effects also achieve. Random effects are clearly preferable when there are many levels of the variable in question. So here, it is better to use year as a fixed effect.

So given the sample sizes involved I would simply work with your glm model and not a mixed effects model.

| cite | improve this answer | |
  • $\begingroup$ +1 but note that the OP said that "The problem is that one site was only planted in 2011, so site and year are not fully crossed, so I cannot run a single fixed effect model". I am not sure what exactly your suggestion is then. $\endgroup$ – amoeba Aug 31 '16 at 20:35
  • $\begingroup$ I looked at link which showed varied opinions on the number of observations needed, but it does seem like most people recommend at least 5-6. Still curious about the crossing issue though: am I right in guessing that not having site*year fully crossed would be fine as long as there were at least 5-6 levels of year for each site? $\endgroup$ – alh Aug 31 '16 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.