Tell me more ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Let's say you have a logistic regression model. Some of the factors are intrinsically categorical but some are continuous variables. Under which circumstances should a continuous variable be binned into categories?

For example, logistic regression is widely used in retail credit modeling, and age is an explanatory variable. When is it wise to bin age (e.g., 2-3, 4-10, 11+) and when should you leave it as a continuous variable?

share|improve this question

2 Answers

According to Frank Harrell's useR2010 keynote on Information Allergy: Never.

Edit: And here is a long list of reasons why one should not categorize continuous variables (which is the same thing, but expressed in more statistical terms). And for completeness, here is Andrew Gelman debating the issue some more.

share|improve this answer
Any particular reason as to why? – user40 Feb 10 '11 at 16:07
1  
You should probably look at the slides, or watch the video, for details. – Dirk Eddelbuettel Feb 10 '11 at 16:10

The issues pointed out in the various footnotes and references here do not seem to address this issue. There are numerous situations where detailed intelligent binning is not only appropriate, but adds value to the model.

Let's break it down to the basics, which is that in a digital world every thing is categorical. We never measure AGE down to the second, minute, day, week or even month. Why not? Because we assume that at those minute intervals the response variable is the same. How is tat different from assuming that the response variable is the same for those between ages of 25 and 27, If the data shows that the credit risk for people with 10-15 years of credit history is the same, why would we assume there is a linear relationship there?

Isn't that just trying to impute more in the data than exists?

It is true that by discretizing the data we increase the available degrees of freedom, but only if we assume each interval is defined by a separate variable AND with large data sets (thousands of observations are not only common, but on the low side of many data sets). I think the problem with many comments here are from areas where sample sizes are small, biomed, social sciences, ... In the marketing and financial and other consumer worlds there is more data than you can shake a stick at.

Finally, binning has been an accepted and proven practice in the consumer industry since Fair, Isaac first started building scorecards, back in the 1960's. FICO still uses complex binning techniques for almost all of their models today. One of the current top data mining tools, TreeNet from Salford, is essentially based on binning techniques.

So, anyone who considers binning to not be best practice as a potential transformative technique is not behind the technology curve, way behind.

share|improve this answer
Hi Mike, welcome to quant.SE. Great answer, I completely agree that intelligent binning can add value to a model. You are essentially taking a somewhat Bayesian view that priors should be imposed, even when using classical statistical tools. – Tal Fishman Jul 23 '12 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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