SAS Proc Rank by score: min number of a counts of target variable
I have used SAS PROC Rank to rank a population based on score and create
groups of equal size. I would like to create groups such that there is a
minimum number of target variable (Goods and Bads) in each bin. Is there a
way to do that using proc rank? I understand that the size of each bin
would be different.
For example in the table below, I have created 10 groups based on a
certain score. As you can see the non cures in the lower deciles are
sparse. I would like to create groups such there there are at least 10 Non
cures in each group.
Cures and Non cures are based on same variable: Cure = 1 and Cure = 0
Decile cures non cures
0 262 94
1 314 44
2 340 19
3 340 13
4 353 10
5 373 5
6 308 3
7 342 3
8 440 4
9 305 3
Thanks,
Pradeep
No comments:
Post a Comment