# Should I bin this continuous variable?

I understand that binning is generally frowned upon as you are "throwing away information". However, I'm not sure whether I should in this instance.

I am running a logit regression. One of my control variables is continuous. However the majority of its observations are within spikes at 12 months, 24 months, 36 months, 48 months and 60 months (histogram shown below). It is fairly uncommon to observe any months in between (other than within the first year). As you can see, it is behaving "almost" like a discrete variable.

I have considered banding this by year (i.e. 0-1 year, 1-2 years, etc.). Would this be advisable, or is it still a bad decision to bin in this instance? Note the pseudo R2 value and classification of the model rose with these bands, albeit small.

• I think you need to describe the problem in more detail. – Michael R. Chernick Apr 13 '17 at 14:52
• Your question appears not to be about binning per se but rather on how you intend to introduce this as an explanatory variable into the regression. Without binning, it costs you one degree of freedom: the assumption is that the logit of the response varies linearly with this variable. If you were to bin it (into, say, five bins) and treat the bins as categories, evidently that would cost you $5-1=4$ degrees of freedom, in return for which you do not need a linear relationship. Why not test this by formally comparing the two models? Your alternatives include splining this variable. – whuber Apr 13 '17 at 14:53
• Apologies, the explanatory variable above is length to maturity, and I am modelling ex post probability of default with 8000 observations, so degrees of freedom is not a major issue. Thus, I was hoping to give up the DOF for the non-linear relationship. That way I can interpret the categories against the default (0-1 year), rather than the ME of a 1-month increase (which may not be appropriate for the lengthier loans). Which test could I use in STATA to formally compare the two models? There has been minimal impact on my other coefficients as far as I can tell. – Robert Haffe Apr 13 '17 at 15:13
• I am just hesitant to categorise the variable because I've read everywhere about how its frowned upon and you should avoid it in most instances, because of the "loss in information". So my question is: would be appropriate to in this context? Thanks for your help so far. – Robert Haffe Apr 13 '17 at 15:24
• Use an $F$ test. – whuber Apr 13 '17 at 15:49