0
$\begingroup$

I have run a logistic regression model

fit <- glm(y ~ x1 + x2 + x3 + x1:x2, 
           family = binomial(link = "logit"), data = train)    

The odds ratio for x1, x2 are significant (1.04, 1.18) and the odds ratio of the interaction is significant and 0.99. How is it possible that x1, x2 to increase the probability for y = 1 and their interaction to decrease it? I have made the plot how the slope of x1 on y changes with the values of x2 and I see: enter image description here and when I plot how the slope of x2 on y changes with the values of x1 and I see:

enter image description here

Can you help me to explain this?

$\endgroup$

1 Answer 1

0
$\begingroup$

Remember that even odds means odds of 1. The odds ratio of 0.99 associated with your interaction term means that the overall odds decrease as either of x1 or x2 increase while the other is held constant. That's consistent with what you see in your first plot.

The original coefficients are in a log-odds scale, where this becomes a bit more obvious: the x1 coefficient in that scale is 0.039, the x2 coefficient is 0.166, and the interaction coefficient is negative, -0.01.

I'm not sure how you generated and labeled the second plot, as the range of x2 values is far from that in the first plot and the "partial slope" values on the vertical axis are enormous.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.