08-31-2012 11:09 AM
i have 3 variables.
Los index is length of stay
Hospital Los Index Mortality Index
A 1.12 1.28
B 0.14 0.94
For Hundreds of records like this...
I want to calculate percentiles 10,20 ,25, 30,40,50,60,75,80,90, and 100 th for this data in SAS
And the ranks of the hospitals
Could somebody help me please..........
Thanks a lot
08-31-2012 12:25 PM
I first use proc univariate on the Los index variable.I will output the percentiles to another dataset,
To the output dataset when i use rank on the same variable i get rankalso in my final dataset.is that right?????
Thanks a lot
08-31-2012 02:04 PM
SO DO U WANT ME TO RUN THIS CODE AND IT WILL GIVE PERCENTILES AS WELL AS RANKS FOR BOTH OF THESE VARIABLES????????
proc rank data=DSETNAME groups=100 out=ranked_a;
var LOS_INDEX MORTALITY_INDEX;
08-31-2012 02:07 PM
That will provide "percentile ranks"; it will not provide ranks as they are normally thought of (sequential number from 1 to <samples size>).
08-31-2012 02:25 PM
I understand that. PROC RANKS, as you wrote it, will not provide the ranks, it will provide 'percentile ranks' and they are a bit different. In order to get both the specified percentiles and the ranks, you need to run two procedures.