0
$\begingroup$

I am working with a very large dataset that essentially covers the entire population of interest. I want to assess the linearity assumption between an independent variable and the log(odds) of the dependent variable in logistic regression.

There are different ways to check this assumption, with a typical method being to create a statistical term representing the interaction between each continuous independent variable and its natural logarithm. If any of these terms is statistically significant, the assumption is violated. Solutions include dummy coding the independent variable, or statistically transforming it into a different scale."

Given the dataset's size, how can I effectively check for linearity without overly relying on statistical significance, because with large datasets things tend to be really quickly significant? Or is it even necessary to check this assumption?

$\endgroup$
6
  • 1
    $\begingroup$ You can graph the scatter plot between each predictor variable and the logit values, and add a smoothed line (such as loess) and then make a judgement as to whether it is straight or not. $\endgroup$
    – Peter Flom
    Sep 9 at 11:41
  • $\begingroup$ its's from: Academic Emergency Medicine Volume 18, Issue 10 $\endgroup$
    – LeterPeko
    Sep 9 at 11:47
  • 1
    $\begingroup$ Thanks. I prefer to look at statistical sources for statistical info. Of course, other journals are sometimes right, but ... I wouldn't look to American Statistician for advice on emergency medicine, so, I don't do the opposite. $\endgroup$
    – Peter Flom
    Sep 9 at 11:51
  • $\begingroup$ Haha, It was more for explaining the method I have seen it more in different sources. But my teacher kind of hinted that checking this assumption might not be necessary at all. But I have a hard time remembering why he said that. Do you have any information about that, or do you think it is necessary? $\endgroup$
    – LeterPeko
    Sep 9 at 11:55
  • $\begingroup$ Sorry, but I don't. Is your name a play on the great chess player Peter Leko? $\endgroup$
    – Peter Flom
    Sep 9 at 12:21

1 Answer 1

1
$\begingroup$

The procedure given in the quote is part of the Box-Tidwell procedure, see

and search this site. A better reference is An R Companion to Applied Regression which has a detailed treatment.

But there are probably better ways: Use visualization of residuals, see for instance Diagnostic probability plots in logistic regression and search this site.

But, since you have large data, why not model upfront with modern, flexible models using splines? As an example, in the logistic regression models I see, there is often a predictor age. If this variable covers an appreciable part of a normal human lifelength, there is no chance its effect will be linear. I do not test that, I spline it from the start.

This is consistent with the good advice at When to check model assumptions

$\endgroup$

Your Answer

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

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