07-07-2016 11:58 AM
I have some questions, regarding percentiles in proc univariate. I am able to calculate the percentiles from 50 to 100 by 5 using the below output statement.
output pctlpre=P_ pctlpts=50 to 100 by 5 ;
When doing so I get the 80-100th percentile equal a success rate of 100. Does this mean that any one with a success rate of 100 belongs in all of these percentiles? Also, is there a way that I can have sas create a data set for me with a column indicateing what percentile everyone belongs in?
How would that work with 80-100 being equal?
Thanks for your help.
07-07-2016 12:58 PM
It probably reflects either the number of responses or the number of unique responses in your data.
If you only have 5 response for instance, 1,2,3,4,5 then the Value 5 would have percentiles from 85 to 100.
You may need to clarify exactly what you mean for percentile if you have fewer than 100 responses to work with as in that case you will have multiple integer percentiles (1, 2, 3, ...,98,99) possible for the same value.
One way would be to use PROC Rank with groups = 100 for your numeric variable
proc rank data=have out=want groups=100;
07-07-2016 03:55 PM
If you have 20 unique values then each one will represent a percentile group of 5% roughly.
This depends a bit on how you define your percentiles. Look at the PCTLDEF option in Proc Univariate to see your options