# Why does my model output show levels within the fixed effects and interactions?

Apologies in advance for a possible duplicate or off-topic question, but I haven't been able to solve this via Googling and I'm not even sure of the search terms, because I don't know if this is a problem where I need to improve my understanding of generalised linear mixed models, or if it is more a problem relating to using R.

Anyways, I'm analysing correct/incorrect responses from an experiment with categorical factors A (levels = 2, ordered), B (levels = 3, ordered), and covariate C with a logit glmer.

Model ~ A * B * C + (1|randomEffect1) + (A|randomEffect2)


I use Anova from the Car package to calculate chi-sq statistics for reporting the fixed effects. The problem is that this is the output for summary(Model):

Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept)           -0.52272    0.17052  -3.066 0.002173 **
C                     -0.38642    0.16332  -2.366 0.017979 *
B2                    -0.64491    0.22017  -2.929 0.003399 **
C3                    -0.05960    0.18619  -0.320 0.748893
C2                    -0.08181    0.13666  -0.599 0.549427
C:A2                  -0.37842    0.21410  -1.767 0.077146 .
C:B3                  -0.29552    0.15930  -1.855 0.063581 .
C:B2                  -0.30852    0.12110  -2.548 0.010846 *
A2:B3                 -1.11872    0.29313  -3.816 0.000135 ***
A2:B2                 -0.52202    0.20609  -2.533 0.011311 *
C:A2:B3                0.57988    0.28050   2.067 0.038703 *
C:A2:B2                0.28810    0.18973   1.518 0.128890


However, the output for car::Anova(Model, test.statistic = "Chisq", type=2):

                  Chisq Df Pr(>Chisq)
C                 12.6060  1  0.0003845 ***
A                 19.2982  1  1.118e-05 ***
B                 15.9511  2  0.0003438 ***
C:A               1.3361  1  0.2477263
C:B               4.2334  2  0.1204260
A:B               22.1787  2  1.527e-05 ***
A:B:C             5.4237  2  0.0664152 .


Is this a theoretical issue, or is there a programmatic way that I can harmonise the outputs so that they're organised the same way? Ideally, I would prefer if summary(Model) matched the more concise car::Anova(Model, test.statistic = "Chisq", type=2).

## 1 Answer

Why does my model output show levels within the fixed effects and interactions?

Imagine for a moment if it didn't, and to keep things simple let's suppose you have only one fixed effect, a factor, say Eye Colour, with three levels, say "Blue", "Brown" and "Other". Now, let us suppose that you are interested in the association of eye colour with some outcome variable, $$Y$$. Since the question has nothing to do with generalised, or mixed effects, models, you fit a model such as

lm(Y ~ EyeColour, mydata)


And, (by default in R for example), you will obtain an estimate for the intercept, which will be the expected value of $$Y$$ for people with blue eyes (assuming that blue is the reference level). The model will also produce estimates for people with brown eyes, which will be the estimated difference in $$Y$$ for people with blue and brown eyes; and another estimate for "other" which will be the estimated difference between those with blue and other coloured eyes. So there will be 3 estimates, providing inference about the the response, $$Y$$, for each eye colour.

Ideally, I would prefer if summary(Model) matched the more concise car::Anova(Model, test.statistic = "Chisq", type=2).

Given what I said above, this would not make sense at all. If you want to test the significance of a variable in a model via a likelihood ratio test, then you could use Anova for that, but typically you also want the estimates for the individual levels of a factor, and Anova won't give you that.

• Thanks for your clear explanation! I am obviously still coming to terms with how these different models work. I think that in my previous use of glmer, I worked with numeric variables or factors with only two levels, hence my confusion. Commented Feb 10, 2021 at 21:18
• You're welcome. Commented Feb 10, 2021 at 21:24