This is a simplified example of my model formula:

Response ~ Treatment * Condition + (1|Plot/sublot)

Treatment and Condition have 2 levels each, (say A/B and a/b) however treatmentA is applied to half of all plots and the other half get treatmentB, while each subplot has condition a or b and vice versa, for all plots. Then let's say that three samples have been taken out of each subplot.

Until it was pointed out to me by a colleague, I was blind to the fact that by specifying Plot as random effect I was effectively explaining away any effect of Treatment on the response as random. However I do need to account for the non-independence of samples within subplot and subplots within Plot. I mindlessly made the assumption that the response will vary randomly among Plots within each treatment category but that's not what the formula says...

One suggestion was to make two separate models for the plots of each treatment with only random effects and then use the residuals as response on the full model.

I would really appreciate any thought on this, or any alternative suggestion.

update: After reading this answer I am beginning to wonder whether our concern is justified. Do the random effects specified as in my formula above, mean that the response varies randomly among plots across treatments? Because if the proposed formula in the link (for a design that is similar in this respect with mine) is the appropriate one for that design, then it takes into account that plots are nested within treatment (irrigation in the link).

I am using the glmmTMB package.


1 Answer 1


A model with this formula

Response ~ Treatment * Condition + (1|Plot) + (1|Plot:sublot)

will yield the same output as a model with this formula

Response ~ Treatment * Condition + (1|Treatment:Plot) + (1|(Treatment:Plot):sublot)

as long as plots within each treatment level are uniquely named. So it looks like the function can take the nesting into account as long as the structure of your dataframe reflects it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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