I'm trying to understand why adding a covariate and an interaction term gives different results on the significance of the key IV from adding only the covariate. I have a categorical IV (2 levels), and a binary outcome (coded as 1 and 0). I also have a continuous covariate.
If I only add IV (i.e., condition) to the logistic regression model, the IV has a significant effect on DV:
glm(formula = DV ~ condition, family = "binomial", data = df)
(AIC: 307.38)
If I add IV and the covariate to the logistic regression model, the IV still significant:
glm(formula = DV ~ condition + covariate, family = "binomial", data = df)
(AIC: 306.29)
But when I added IV, covariate and the interaction, the IV no longer significant but the covariate became significant:
glm(formula = DV ~ condition * covariate, family = "binomial", data = df)
(AIC: 306.48)
I'm so confused. It's there any problem to add interaction to logistic regression, or it's the fact that my IV doesn't really have an effect on DV? I read a similar post here but I'm still confused.
Follow-up: I tried to only include covariate in the model:
glm(formula = DV ~ covariate, family = "binomial", data = df)
(AIC: 308.69, not sure if this is relevant)
Each of the coefficients in your function 'soak up' a certain amount of predictiveness. If you have a variable whose coefficient decreases after including a new variable, specifically an interaction term, then that term is replacing a certain amount of the original variables predictive power.
This does not mean that your original variable is not significant because it certainly was when the new variable was not present. This does mean that the two variables are competing against each other. I suggest you evaluate the model by replacing the old variable with the new variable then decide which makes better sense to keep.