# GLMM in seed germination study

I have an experimental design measuring germination of a single species of tree under different treatments. The treatments include; cattle grazing and no cattle grazing and rodents and no rodents. The cattle grazing treatments are a paired design with a subplot with cattle fencing directly adjacent to a subplot without cattle fencing. There are 16 plots (32 sub plots) in all.

Unfortunately, the rodent cages we used would be completely destroyed by cattle had we put them in grazing subplots, so they were only installed in the no-grazed plots (fenced enclosure) over half the planted tree seeds. I was going to use GLMM in R to model the binary germination yes/no response.

If I am trying to determine the effects of grazing and no grazing how would I account for the treatment of rodent cages within the no-grazing treatment? Would I treat it as a random effect or just add it into the model as another fixed effect?

• Interesting, but I think we need some more information: On the no-grazing subplots, they are effectively parted in two as sub-sub-plots, with/without rodent cages? You said binary response, germination yes/no. That means you will have data for each planted seed separately, not only percent germination by plot? – kjetil b halvorsen Dec 27 '19 at 13:56
• Thanks for your response. – P. Brian Dec 28 '19 at 19:08
• The rodent cages are distributed randomly within the no-grazing subplot. So not a sub-sub-plot situation. I do have germination data on every seed, yes. – P. Brian Dec 28 '19 at 19:10
• So for every seed, you know if it is under a rodent cage or no, yes? I will try to write an answer. – kjetil b halvorsen Dec 28 '19 at 20:11

The effect of rodents is clearly of interest, and should not be treated as a random effect. But it must be coded in a special way, as it is not defined on the grazing subplots. You have the variables Plot, subPlot, Y (germination or not) and Rodent (present cage or not.) Your datafile will have one line per seed and look something like

Plot    subPlot          Y     Rodent
1          grazed        1     NA
1          grazed        0     NA
1          nograzed      1     yes
1          nograzed      1     no
.
.
.


The variable Rodent is not defined on the grazed subPlots, so we need the advice from How do you deal with "nested" variables in a regression model? to code it, and we represent it only as an interaction.

So, using the R package lme4, we can use a model like

mod0 <- lme4::glmer(Y ~ Rodent:(subPlot %in% "nograzed") +
subPlot + (1 | Plot), family=binomial, data=your_data_frame)


So only the whole plots is modeled as a random effect.

• thank you so much for this. You answered my question perfectly. – P. Brian Dec 31 '19 at 6:47