* PercentileDefs1 Example; * Compute percentiles for a small dataset using the 5 percentile definitions available in SAS; options linesize=70 nodate pageno=1 formchar="|----|+|---+=|-/\<>*"; data primes10; input x @@; datalines; 2 3 5 7 11 13 17 19 23 29 ; proc means n p25 p50 p75 pctldef=1; title 'N = 10 Percentile Definition 1'; proc means n p25 p50 p75 pctldef=2; title 'N = 10 Percentile Definition 2'; proc means n p25 p50 p75 pctldef=3; title 'N = 10 Percentile Definition 3'; proc means n p25 p50 p75 pctldef=4; title 'N = 10 Percentile Definition 4'; proc means n p25 p50 p75 pctldef=5; title 'N = 10 Percentile Definition 5'; run; data primes10; input x @@; datalines; 2 3 5 7 11 13 17 19 23 29 31 ; proc means n p25 p50 p75 pctldef=1; title 'N = 11 Percentile Definition 1'; proc means n p25 p50 p75 pctldef=2; title 'N = 11 Percentile Definition 2'; proc means n p25 p50 p75 pctldef=3; title 'N = 11 Percentile Definition 3'; proc means n p25 p50 p75 pctldef=4; title 'N = 11 Percentile Definition 4'; proc means n p25 p50 p75 pctldef=5; title 'N = 11 Percentile Definition 5'; run; quit;