<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Calculating Percentiles in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10222#M935</link>
    <description>I'm trying to find a procedure in SAS that produces percentiles according to the formula 100*(n-1)/N-1 where n is the rank score and N is the total number of observations.  &lt;BR /&gt;
&lt;BR /&gt;
For example, suppose I have three values: 10, 40, and 50.  MS Excel calculates the percentiles as 0%, 50%, and 100%.  Using the PROC RANK procedure, I get percentiles of 33%, 66% and 100% using the PERCENT option or 25%, 50%, and 75% using the NPLUS1 or GROUPS=100 option.&lt;BR /&gt;
&lt;BR /&gt;
Am I missing something?  Do I have to code this in a DATA step to get what I'm looking for?</description>
    <pubDate>Tue, 24 Mar 2009 20:30:19 GMT</pubDate>
    <dc:creator>1162</dc:creator>
    <dc:date>2009-03-24T20:30:19Z</dc:date>
    <item>
      <title>Calculating Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10222#M935</link>
      <description>I'm trying to find a procedure in SAS that produces percentiles according to the formula 100*(n-1)/N-1 where n is the rank score and N is the total number of observations.  &lt;BR /&gt;
&lt;BR /&gt;
For example, suppose I have three values: 10, 40, and 50.  MS Excel calculates the percentiles as 0%, 50%, and 100%.  Using the PROC RANK procedure, I get percentiles of 33%, 66% and 100% using the PERCENT option or 25%, 50%, and 75% using the NPLUS1 or GROUPS=100 option.&lt;BR /&gt;
&lt;BR /&gt;
Am I missing something?  Do I have to code this in a DATA step to get what I'm looking for?</description>
      <pubDate>Tue, 24 Mar 2009 20:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10222#M935</guid>
      <dc:creator>1162</dc:creator>
      <dc:date>2009-03-24T20:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10223#M936</link>
      <description>It would appear that you can call 10 the 0th or 25th percentile or anything in between and up to the 33rd.  Which I suppose makes since with N=3.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data have;&lt;BR /&gt;
   input y @@;&lt;BR /&gt;
   cards;&lt;BR /&gt;
10 40 50&lt;BR /&gt;
;;;;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc univariate noprint;&lt;BR /&gt;
   output out=pct  PCTLPRE=pct PCTLPTS=0 to 100 by 1;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc transpose;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 25 Mar 2009 00:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10223#M936</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-25T00:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Percentiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10224#M937</link>
      <description>I'm not sure I understand the utility of this solution.  The output assigns the value 10 to all percentiles between 0% and 33%.  I would expect the 10 value to be assigned just to 0%.  Using the formula in my first post, the percentile would be 0% and not any other values.  The second value, 40, would be assigned a percentile of 50%, not all the percentiles between 34% and 66%.</description>
      <pubDate>Wed, 25 Mar 2009 20:16:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculating-Percentiles/m-p/10224#M937</guid>
      <dc:creator>1162</dc:creator>
      <dc:date>2009-03-25T20:16:35Z</dc:date>
    </item>
  </channel>
</rss>

