# Interpretation of main effects in case of an interaction in binary logistic regression

I have a question about interpreting the main effects from an interaction in a binary logistic regression model. I used glmer() in R with a model with binary predictors only. The factors of interest for this question are the following:

DV: accuracy (0,1)

IV: A (levels: I, L)

IV: B (levels: NS, S)

An interaction of A and B shows that L leads to higher accuracies for NS compared to S. There also seems to be a main effect of A, meaning higher accuracies for L compared to I. I would like to report this effect as it is important for my hypothesis, but I don't know how. I read that in case of an interaction, a main effect only shows the conditional effect on the reference level, meaning that the main effect only reports the effect of A for either NS or S (depending on the chosen reference level). I'm not sure if releveling would be appropriate, as some of the coefficients change (for example the intercept). Some people write that in case of an interaction, you should not interpret main effects at all, but since this main effect is important, I believe it should not be ignored.

Does anyone have advice on this issue? Many thanks!

I'm not sure if releveling would be appropriate, as some of the coefficients change (for example the intercept)

Changing the reference level will not achieve much when you only have 2 levels of the independent variables. The intercept will change, but it's just a simple re-parameterisation of the model. When you have a lot of levels of a categorical variable then it might make sense since all contrasts will be against a different level, but then you can easily run into problems with multiple testing.

The question title is:

Interpretation of main effects in case of an interaction in binary logistic regression

The main effects are interpreted differently in a model where those main effects are involved in an interaction. With no interaction, the main effects are interpreted as the expected difference in the log-odds of the outcome between the reference level (which is included in the intercept) and the level for that estimate, with any other fixed effects held constant. So in the case of your data, with no interaction, the estimate for A will be the expected difference in the log-odds of accuracy=1 between A=I and A=L. In the presence of an interaction, this changes and the main effects are conditional on the reference level of the other variable(s) in an interaction. So, in your case with A interacted with B, the main effect for A is the expected difference in the log-odds of accuracy=1 between A=I and A=L, when B is at it's reference level.

I find it helps to understand this when you realise that, with continuous/numeric fixed effects, the intercept is the value of the outcome (or the linear predictor in the case of a generalised linear model) when the fixed effects are zero. With categorical variables it is the same, but behind the scene the software will create dummy variables so in your case with 2-level categorical variables, these can easily be seen as just binary 0/1 so the "reference" level is just the level that corresponds to 0 and is therefore part of the intercept.

Some people write that in case of an interaction, you should not interpret main effects at all, but since this main effect is important, I believe it should not be ignored.

This is a common misconception. The point is that very often the intepretation of main effects in the presence of an interaction is not meaningful, for example in a categorical by continous interaction where the continuous variable is height, the other main effect would be conditional on height=0, which is obviously not useful. This can easily be ovecome by centering the variable. But when both variables are categorical, you are right and then should not be ignored. There is a rather different issue when one or more of the main effects are not "significant" but the interaction is, but that's a whole other story.

• Thank you for your clear answer! If I can follow up on this: how would you then report this main effect? Of course, I can report the coefficients and say that they hold when B is at it's reference level NS. But since the effect is present also when I choose S as the reference level, I'm not sure whether I should report both, and if so, how (it feels like I'm computing a model twice when I relevel, even if I only have two levels of the independent variable, as you mentioned). – Vera Jul 8 at 7:32
• You're welcome. There is no need to relevel, your intuition is correect, it is computing the model twice. With only 2 levels each you can calculate the releveled estimates by hand if you wanted to, just by inspecting the model output. Just report them exactly as they are in the output. By all means mention what the reference levels are. Readers should understand. – Robert Long Jul 8 at 7:38
• Great, thank you! – Vera Jul 8 at 7:45