## How to calculate Percentile

Occasional Contributor
Posts: 11

# How to calculate Percentile

Is there a SAS method to calculate Percentile that matches the Excel function 'PERCENTILE'?

Which is the difference between each SAS method?

Giuseppe
Super Contributor
Posts: 3,176

## Re: How to calculate Percentile

Have you investigated PROC UNIVARIATE?

Base Procedures Guide: Statistical Procedures -- Calculating Percentiles
http://support.sas.com/documentation/cdl/en/procstat/63032/HTML/default/procstat_univariate_sect028....

Scott Barry
SBBWorks, Inc.
Occasional Contributor
Posts: 11

## Re: How to calculate Percentile

Thanks Scott, it was really what i was looking for.

Regards
-giuseppe
Occasional Contributor
Posts: 9

## Re: How to calculate Percentile

Hi

The link you supplied is helpful, but I don't know how to replicate Excel's behaviour (whether that's desirable or not is another question...)

e.g.

 data 0 0 1 3 4 7 9 13 18 20 26 29 43 46 49 58 73 78 162

Results

 Excel calc Result percentile(range,0.25) 5.5 percentile(range,0.5) 20 percentile(range,0.75) 47.5 percentile(range,0.95) 86.4

Does anyone know what settings to apply to ensure SAS replicates Excel's behaviour using this example data?

Thanks

Matt

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