2
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ The first question is probably answered here. As for the second, if you decided to go with a multiple comparisons test (post hoc), the answer is here or here. 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 $\endgroup$
    – Mateus
    Commented Dec 21, 2020 at 20:16

0

Your Answer

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

Browse other questions tagged or ask your own question.