# Logistic Regression Odd Ratio Linearity

I'm at the exploratory stage of a logistic regression model. The outcome is saying yes or no to a particular offer and the independent variable I'm currently investigating is the age of the customer. I initially constructed a simple histogram of the age of the customers and then a histogram of the ages of just the people who replied 'yes' on top of the original histogram. This gave me a feel for if the rate of 'yes' repliers was increasing with age. I then used the values in each bin of the histogram and the mid point of each bin to construct a discrete plot of 'age' vs 'rate of yes responses'. There was clearly a positive relationship between the age of the customer and the rate of yes repliers. However this was not a linear relationship, it looked more like a logarithmic curve. I subsequently ran the simple logistic regression with the original binary yes/no dependent variable and the continuous age independent variable. Age had a tiny p-value and an odds ratio of 1.04. Not knowing anything else I would always have interpreted this odds ratio as 'for every increase of one year in customer age the odds of replying yes increase by 4%'. However as I mentioned before I know that the magnitude of the increase in 'rate of replying yes' in entirely dependent on what part of the age range we are looking at. Does ignoring this non linearity make my interpretation of the odds ratio over simplified?

• The short answer to your question is yes. Why not try adding some non-linear term in age? – mdewey Oct 22 '17 at 15:07
• Your exploration is a good approach. However, you have not actually observed a non-linearity, because you have not expressed the proportions of responses in a manner appropriate for logistic regression. Please, instead plot the log odds of the responses against age. Does that look at least approximately linear? If so, then logistic regression (with its usual logistic link function) will be a good tool for understand the relationship. – whuber Oct 22 '17 at 16:18
• Thank you for the quick replies. I tried adding some non-linear terms which turned out not to be significant. Then following the advice of @whuber I plotted the log odds against age and saw that it was 'roughly' a linear relationship. – R_Mor88 Oct 29 '17 at 12:07

## 1 Answer

Short answer: Yes. Given what you've said, that's a simplification of reality.

Longer answer: All statistical models are simplifications of reality. As George Box said "all models are wrong, but some are useful". Is your model useful?

To investigate nonlinear possibilities, you could look at spline effects of age. You could also try polynomial effects.

• It's not clear what this answer is saying "yes" to! – whuber Oct 22 '17 at 16:19
• "Yes" it's a simplification. – Peter Flom Oct 22 '17 at 23:12
• Thanks for the reply. I like the quote of Box a lot and it's something I'll certainly keep in mind; the use of this model is already seeing an apparent relationship. I proceeded as described in my comment under my original post. – R_Mor88 Oct 29 '17 at 12:14