<?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 Re: Percentile using mean in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472687#M121230</link>
    <description>&lt;P&gt;Well, a p-value is always associated with a statistical hypothesis test. So, you'd have to specify this test. As a start, let's assume that you want what is probably the most common choice in the situation you described in &lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Tertile-in-SAS-mean/m-p/472386#M24587" target="_blank"&gt;the other thread&lt;/A&gt;: the two-sided t-test for paired samples. But you should&amp;nbsp;double-check your requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The corresponding SAS procedure, PROC TTEST (with the PAIRED statement), does not only compute "the" p-values, but also the requested summary statistics. Continuing with dataset WANT from my first reply in this thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=want;
by tertile;
run;

ods select none;
ods output ttests=ttest
           statistics=tstats;
proc ttest data=want;
by tertile;
paired weight*follw1_weight;
run;
ods select all;

data want2;
merge tstats(keep=tertile mean stddev)
      ttest(keep=tertile probt rename=(probt=p_value));
by tertile;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jun 2018 09:55:21 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2018-06-23T09:55:21Z</dc:date>
    <item>
      <title>Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472431#M121139</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have values (1 to 300) in a column i want to find the mean and std of 33.33rd percentile for that values.&lt;/P&gt;&lt;P&gt;How do i solve that. please help me!...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 10:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472431#M121139</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2018-06-22T10:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472434#M121141</link>
      <description>&lt;P&gt;Result 1 on google search seems to have the answer:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/10/23/percentiles-in-a-tabular-format.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/10/23/percentiles-in-a-tabular-format.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For non-standard percentiles use stdzise.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 10:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472434#M121141</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-22T10:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472474#M121151</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215282"&gt;@Sathish_jammy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you've started a second thread for essentially the &lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Tertile-in-SAS-mean/m-p/472386#M24587" target="_blank"&gt;same question&lt;/A&gt; -- not ideal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would probably let&amp;nbsp;PROC RANK identify the percentiles (i.e. tertiles) and then&amp;nbsp;use&amp;nbsp;PROC SUMMARY to calculate the descriptive statistics for each of the three groups. Using your data from the &lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Tertile-in-SAS-mean/m-p/472386#M24587" target="_blank"&gt;other thread&lt;/A&gt; as dataset HAVE:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=have out=want groups=3;
var weight;
ranks tertile;
run;

proc summary data=want nway;
class tertile;
var weight follw1_weight;
output out=stats mean= std= / autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jun 2018 13:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472474#M121151</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-06-22T13:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472676#M121224</link>
      <description>&lt;P&gt;Thank u so much! it works well...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how do i get the mean difference &amp;amp; STD difference&amp;nbsp; ,as well p-value for each 3 tertiles.&lt;/P&gt;&lt;P&gt;Could u please help me again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 06:01:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472676#M121224</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2018-06-23T06:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472687#M121230</link>
      <description>&lt;P&gt;Well, a p-value is always associated with a statistical hypothesis test. So, you'd have to specify this test. As a start, let's assume that you want what is probably the most common choice in the situation you described in &lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Tertile-in-SAS-mean/m-p/472386#M24587" target="_blank"&gt;the other thread&lt;/A&gt;: the two-sided t-test for paired samples. But you should&amp;nbsp;double-check your requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The corresponding SAS procedure, PROC TTEST (with the PAIRED statement), does not only compute "the" p-values, but also the requested summary statistics. Continuing with dataset WANT from my first reply in this thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=want;
by tertile;
run;

ods select none;
ods output ttests=ttest
           statistics=tstats;
proc ttest data=want;
by tertile;
paired weight*follw1_weight;
run;
ods select all;

data want2;
merge tstats(keep=tertile mean stddev)
      ttest(keep=tertile probt rename=(probt=p_value));
by tertile;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 09:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472687#M121230</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-06-23T09:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile using mean</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472697#M121234</link>
      <description>&lt;P&gt;You are really awesome!...&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thank you so much...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 11:49:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percentile-using-mean/m-p/472697#M121234</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2018-06-23T11:49:12Z</dc:date>
    </item>
  </channel>
</rss>

