Monday, December 18, 2006

Calculating percentiles in SAS

Following code can be used to find the percentiles.

proc univariate data=food noprint;
var omega sat;
output out=pctl pctlpts=20 40 60 80 pctlpre=omega sat;
proc print data=pctl;

Output would be in the following format
omega20 omega40 omega60 omega80 sat20 sat40 sat60 sat80