Hi All,
I have a logistic regression in R whose goal is to predict the probability of default on some test data
glm(default ~ X1 + X2 + X3 + X4 + X5 + X1:term + term:X5 - 1, family="binomial", data=mydata)
What I'd like to do is 'bin' this data so that bins 1 to n each have a certain rate of default. How can I bin the logistic regression results in this way? For example, the bins on a sample set of 1000 might look like:
Bin# P(Default) Count
1 10% 4000
2 20% 1100
3 30% 1500
That is, I set in advance the probabilities I want each bin to have (0.1,0.2,.0.3) and then bins are created based around those settings.
Thanks in advance