# Which random effects to include in this GLMM?

In my study growth of plants was measured in different years on different plots (all plants were measured in all years). The question I'd like to answer with my model is: Which factors influence growth and how?

I do not want to make predictions on growth, I am simply interested in the effects of the predictors. I am also not interested in overall fixed effects of year or plot themselves.

My predictors can be grouped in three categories:

1. Predictors which characterise the sampled plants (these are continuous or categorical): A1, A2, A3 (4 levels)
2. Predictors which characterise the plot (these are continuous): B1, B2
3. Predictors which characterise the conditions in the years of sampling (these are continuous): C1, C2

I am so far using a GLMM with the different predictors as fixed effects and plant ID as a random effect.

growth ~ A1 + A2 + A3 + B1 + B2 + C1 + C2 + (1|Plant ID) However, I am wondering if I have to include year of sampling and plot as additional random effects? This would especially change the standard errors of predictor A3 a lot. The categorical predictor A3 is a bit special as it has four levels which change between years but within each year each plant across all plots has the same level.

growth ~ A1 + A2 + A3 + B1 + B2 + C1 + C2 + (1|Plant ID) + (1|Year) .. which is the same as:

growth ~ A1 + A2 + A3 + B1 + B2 + C1 + C2 + (1|Plot:Plant ID) + (1|Year) .. but different from:

growth ~ A1 + A2 + A3 + B1 + B2 + C1 + C2 + (1|Plant ID) + (1|Year) + (1|Plot) Do you have any advice for me on how to correctly specify the random effects?

Why does adding Plot and Year as random effects increase the standard errors of the estimates of (some) fixed effects?

• Do you have Repeat measures on the same plant (plant_id) within plots across years? – OliverFishCode Mar 1 '19 at 18:56
• Yes, there are repeated measures on the same plant across years (but not within years). So the number of overall observations per plant ID is equal to the number of sampling years. – user45065 Mar 2 '19 at 11:49

From the picture and descriptions you give, I think Plant is nested within Plot and both of them are crossed with Year of sampling.
If this is the case, then you could account for the dependencies in your data with a model like

growth ~ A1 + A2 + A3 + B1 + B2 + C1 + C2 + (1 | Plot/Plant) + (1 | Year)


Whether you should include Plot and Year of sampling as random grouping factors depends on how much variance there is between the different levels within that grouping factors. Personally, I would start with the maximal random effects structure justified by the design and reduce the model if it turns out to be overparameterized (see e.g. Bates et al., 2015 or this answer).

(1 | Plot:Plant) + (1 | Year) is the same as (1 | Plant) + (1 | Year) because Plant is nested explicitly within Plot, i.e., the levels of Plant are coded uniquely across the levels of Plot.

Why does adding Plot and Year as random effects increase the standard errors of the estimates of (some) fixed effects?

This is because all your fixed predictors are between-unit-predictors (meaning they vary between certain levels of a random grouping factor, not within). Thus, intuitively speaking, if the data points of different plants, plots or years vary a lot (and independent of the factor levels or range of the fixed effects), the effects of the predictors are less reliable - and this is reflected by the increased standard errors.

• Thanks for your answer. However, my first question basically is: do I HAVE TO include year as a random effect if I have included fixed effects which I expect to explain the variation between years? Because if I then include year as a random effect, wouldn't I somehow "reduce" the power of the fixed effects to explain the variance in my response variable? Brian McGill mentions this in his blog post: – user45065 Mar 2 '19 at 17:26
• One alternative to putting site in as a blocking variable would be to measure key variables (e.g. soil moisture, productivity) and put these in as continuous variables (although you might still need a hierarchical design to avoid charges of psuedoreplication). These would then be control variables – instead of controlling for site you control for site moisture and productivity. – user45065 Mar 2 '19 at 17:27
• @beetroot It depends on what you want to achieve. If you want to generalize over Year of sampling and account for the 'incremental' variance explained by this grouping factor in addition to those fixed effects, I think you should include it. If you just want to partial out the variance explained by the continuous covariates, you could also go with that. – statmerkur Mar 2 '19 at 18:15
• OK, thanks, I think I want the latter. So e.g. adding Plant and Plot ID would be sufficient to account for the repeated measurements structure and I could leave out Year in order to fully concentrate on the fixed effects associated with year for their effect without compromising the validity of the model and results? – user45065 Mar 2 '19 at 18:31
• @beetroot It may be worth exploring the use of an ar1 covariance as you have repeat measures, and growth in one year may be dependent on the previous year. Organisms that grow faster in one year have a tendency to do so in successive years, up to a asymptotic "maximum" size. Additionally, as you approach the "max" size growth will slow exponentially; this is the foundation for most growth curves. Furthermore, slightly off topic from your question you could use a growth curve and model the growth function as the outcome of some linear combination of your covariates. Then test differences. – OliverFishCode Mar 3 '19 at 0:01