Programming the statistical procedures from SAS

Proc rank decile binning

Accepted Solution Solved
Reply
Contributor
Posts: 70
Accepted Solution

Proc rank decile binning

Hello

 

In logistic regression after deciling using proc rank, I ran proc freq which returned below output

 

decile.JPG

I am getting different frequencies in each decile, is it necessary that we should get equal number of frequencies in each decile?.

 

Thanks


Accepted Solutions
Solution
‎06-16-2017 06:41 AM
SAS Super FREQ
Posts: 3,547

Re: Proc rank decile binning

You will not necessarily get identical numbers in each bin. See the example (and cautionary tale) in the article "Binning data by quantiles? Beware of rounded data!"

View solution in original post


All Replies
PROC Star
Posts: 634

Re: Proc rank decile binning

Necessary for what? Use the GROUPS= option in PROC RANK if you want to have equal frecuencies in your groups

 

Small example

 

proc rank data=sashelp.cars out=carsRanked groups=10;
	var invoice;
	ranks group;
run;

proc freq data = carsRanked;
	tables group / nocum;
run;
Solution
‎06-16-2017 06:41 AM
SAS Super FREQ
Posts: 3,547

Re: Proc rank decile binning

You will not necessarily get identical numbers in each bin. See the example (and cautionary tale) in the article "Binning data by quantiles? Beware of rounded data!"

Contributor
Posts: 70

Re: Proc rank decile binning

Thank you very much.

 

Lets say I want to calculate expected defaults(Y=0), I have 8417/16880=0.499 zeros, then can I say that the expected defaults is 2044*0.499=1019.956 for the decile 4?.decile.JPG

 

Thank you.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 151 views
  • 0 likes
  • 3 in conversation