2

Now, I am running a generalized linear mixed model using lme4 package. I have three category factors (factor 1 has three levels, factor 2 has two levels, factor 3 has five levels). And I want to have the main and interaction effects of them. Here is the model I built:

Model <- glmer(family=binomial, data=data1, 
               formula=value~factor1*factor2*factor3+(1|item)+(1|subject), 
               control=glmerControl(optimizer="bobyqa",optCtrl = list(maxfun = 1e7)))
    summary(Model)
    car::Anova(Model)
  1. I wonder whether I can use car::Anova(Model) to get the main and interaction effects? Is this function suitable for generalized linear mixed model?

  2. And if I have the three-way interaction, how could I do next? Do the post hoc? Or separate one factors to see the influence on the other interactions?

MarianD
  • 1,493
  • 2
  • 8
  • 17
qinli Deng
  • 61
  • 5
  • The first question is probably answered [here](https://stats.stackexchange.com/questions/101566/anova-type-iii-test-for-a-glmm). As for the second, if you decided to go with a multiple comparisons test (post hoc), the answer is [here](https://stackoverflow.com/questions/31013260/post-hoc-test-for-glmer?rq=1) or [here](https://stats.stackexchange.com/questions/237512/how-to-perform-post-hoc-test-on-lmer-model). I usually prefer something along the lines of: library(emmeans) emmeans(Model, list(pairwise ~ factor1*factor2*factor3), adjust = "tukey") *Note: I have included this as an answer becaus – Mateus Dec 21 '20 at 20:16

0 Answers0