# Correcting nonlinear relationship between continuous predictor and logit of dependent variable (Binary logistic regression)

I am running a binary logistic regression with 2 continuous predictors and their interaction. To test whether there is a linear relationship between the predictors and the logit of the dependent variable I have included an interaction term between the predictor and their associated natural logarithm. Unfortunately, for one predictor the interaction term is significant. This indicates to me that the assumption doesn't hold and that the inferences I am making are not valid.

How would you deal with such a scenario? Would you choose to transform the predictor and if so, how can I find an appropriate transformation? I have played around with a polynomial transformation. This did not solve the problem.

Beyond that, I would really like to avoid transformations of any sort to not complicate the interpretation that much.

• Why do you not want to use whatever transformation / nonlinear term(s) you would need to use to make the model fit? Usually, the interpretation of nonlinear terms is not that difficult: when the value of $x$ is -2, the effect of a unit increase (on the logit of the probability) is 0.5, while when the $x$ is +2, the effect is 1.5. The effect is localized, that's all. With nonlinear models, you will likely be better off reporting predictive margins, anyway. – StasK Apr 5 '18 at 15:09

If there is an interaction between predictors ($X_1$, $X_2$) we can say a couple of things about their relationship with a response ($Y$).
• That the relationship between $X_1$ and $Y$ varies across values of $X_2$.
• That the model for $Y$ adjusting for $X_1$ and $X_2$ but not their interaction, summarizes the "average" adjusted response.
To report the first finding, it is useful to show the associations between $X_1$ and $Y$ and between $X_2$ and $Y$ for some fixed levels of $X_2$ and $X_1$ respectively. The R command coplot can do this well. If the shape of the sigmoid curve changes direction or shifts drastically, we can conclude that the interaction has a strong magnitude of effect. Usually, we don't see such a strong relationship, and can conclude that the model was powered to detect small interactions and found one.
If that holds, then the second model, omitting the interaction term, can be reasonably presented. Since there is an extent of model misspecification, it is useful to use a robust variance estimate. I use the Huber-White estimator implemented in the sandwich package by Achim Zeileis.