# How to Check Linearity Assumption in Logistic Regression with a Large Dataset?

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?

• 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. Sep 9 at 11:41
• its's from: Academic Emergency Medicine Volume 18, Issue 10 Sep 9 at 11:47
• 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. Sep 9 at 11:51
• 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? Sep 9 at 11:55
• Sorry, but I don't. Is your name a play on the great chess player Peter Leko? Sep 9 at 12:21

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.