I have a set of variables for building credit scorecards with logistic-regression. I need to bin some variables, for e.g. years of credit history. What is the method to determine how many bins and what is the interval for each bin?
Binning will result in a more complex model, i.e., you will need more terms in the model to predict the outcome as well as a model that treats the predictors as continuous. Bins also bring a degree of arbitrariness into the model. Take a look at regression splines as an alternative. Notes about this may be found at http://biostat.mc.vanderbilt.edu/rms. Also make sure that your outcome is truly dichotomous, i.e., that the time until the event is irrelevant and you have no censoring.
You could specify your binding algorithm in a function, define utility function and optimize input parameters...
The ideas for utility function can be:
- Predictive power (weight of evidence and information value)
- Monotonnicly decreasing average default rate from one bin to another (as you increase the age of history...)
You can also constrain your optimization to look only for three to 5 bins for example...