I am attempting a GLMM with nested fixed effects. Most examples of nesting that I see deal with random effects, but my experimental design is hierarchical by nature and I am interested in making comparisons between treatments at the nested level. My response is proportion fat (continuous), and I am interested in how feeding treatment (3 levels) influenced fat accumulation in different ages within each treatment (two levels), in each season (two levels). within each season, I am also interested in how both ages within each feeding treatment differed from the corresponding age groups in the control. I'm not interested in comparing between seasons. Here are the two models I am using to answer these questions:

GLMMadmb(proportion ~ season/age/treatment + leanweight + (1|source plot), family=beta)

GLMMadmb(proportion ~ season/treatment/age + leanweight + (1|source plot), family = beta)

My output is exactly what I was expecting based on graphing the data ... but the lack of papers that use nested fixed effects in a mixed model makes me wonder if I am missing something ...

For instance, if I simply look at the interaction of season * age * treatment I get comparisons between months not within them, and between age groups but not between the same age in different treeatments. With interactions alone, my coefficents are (leanweight, season2, age2, treatment2, treatment3, season2:age2, season2:treatment2, season2:treatment3, age2:treatment2, age2:treatment3, season3:age2:treatment2, season3:age2:treatment2)

However when I nest season/age/treatment I get the coefficents I want which are ( avgleantwt, season3, season1:age2, season3:age2, season1:age1:treat1, season1:age2:treat1, season2:age1:treat1, season2:age2:treat1, season1:age1:treat2, season1:age2:treat2, season2:age1:treat2, season2:age2:treatment2, season2:age2:treat3) season2:age2:treat3) season1:age1:treat3, season1:age2:treat3, season2:age1:treatment3, season2:age2:treatment3)


1 Answer 1


The "nesting" of fixed effects as you call it sounds like interaction effects.

To my understanding, including season/age/treatment is the same as including season + season:age + season:age:treatment, so you're basically using interaction terms which should be fine. As I have learned, if you include interaction terms, you should also include the main variables that are parts of the interaction terms. So if you instead used season * age * treatment you would get the independent effects of season, age and treatment and all their interactions. Perhaps you miss something important by not looking at, the main effect of age?

You should be perfectly fine, and get similar results, if you use season * age * treatment and finding articles that use GLMM with interaction terms should be easy.

  • $\begingroup$ Thank you for your answer. Both equations give the main effects, but it seems that season/age/treatment gives the additional coefficents I'm looking for, which are absent from the interactions of season * age * treatment. I have added the output to my original question for clarity. $\endgroup$ Aug 18, 2015 at 16:51
  • $\begingroup$ I'm note sure I understand what you want to do. Do you want to study the effects of the two levels of treatment, and both season and age are possible confounders? Then it's easy, just include age and season as independent variables.. why make it more difficult than that? Or do you think that the treatment may have different effects depending on age and season? Then interactions is the way to go, just try seasonagetreatment as I suggested and all main effects, two-way and three-way interactions should be included in the model so you can see thee precise effect of treatment in each group. $\endgroup$
    – JonB
    Aug 18, 2015 at 20:51
  • $\begingroup$ But the question says he want nested effects, and that is what season + season:age + season:age:treatment gives, so is an exception from the "rule" of always including main effects. Maybe that is the reason fpr introducing the shorthand season/age/treatment. $\endgroup$ Aug 6, 2019 at 21:22

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.