0

I'm running two identical logistic models on two different (and with mutually exclusive 1's) DVs on the same dataset. I have an independent variable with similar coefficient in both models and I wanted to check for the assumption of linearity. Graphically, the relationship between $X_1$ and the log odds of both DVs appear almost identical and rather linear.

I ran the Box–Tidwell for both models to check for linearity. The coefficients of interactions of $X_1$ are almost identical in both, but with opposite sign: positive in the first, negative in the second. In both cases, they are not significant. Moreover, the test for non-linearity (stata, boxtid) has two complete different results:

Coeff/Std. Error: 1.16 (.21) p1= 1.47 Nonlin. dev: 0.249 (P = 0.618) (First Model)
Coeff/Std. Error: 0.74 (.21) p1= -1.03 Nonlin. dev. 9.184 (P = 0.002) (Second Model)

In the first case we cannot reject linearity, as I expected, whereas in the second case the test is significant. I honestly did not get what happened. For sure I expected similar results, since the relationship of the IV appear basically identical with both IVs. Any suggestion? Besides that, should I consider the linearity assumption violated in the second model even if the coefficient of the interaction is non-significant? And why instead the test for non-linearity it is? Thanks in advance.

Tiesse
  • 23
  • 3
  • I believe that Box-Tidwell and test for nonlinearity is obsolete, if you suspect non-linearity, just spline that predictor! – kjetil b halvorsen Mar 08 '21 at 01:52
  • I did it indeed, since my predictor has only 10 point I did two splines with cut-point at first quartile. Splines worked in opposite ways in the two models. Splin to 0.25 was positive and significant in the second model, not in the first. The other splin was positive and significant in the first, but not in the second. – Tiesse Mar 08 '21 at 02:07

0 Answers0