<?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: Statistics procedure for sample percentages in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Statistics-procedure-for-sample-percentages/m-p/45623#M12024</link>
    <description>PROC FREQ will do both of these.&lt;BR /&gt;
&lt;BR /&gt;
1) is the natural way.&lt;BR /&gt;
&lt;BR /&gt;
PRC FREQ; TABLES team*cancelled_flag/chisq;  RUN;&lt;BR /&gt;
&lt;BR /&gt;
2) requires data in slightly different format&lt;BR /&gt;
&lt;BR /&gt;
team cancelled_flag count&lt;BR /&gt;
a y 40&lt;BR /&gt;
a n 60&lt;BR /&gt;
b y 50&lt;BR /&gt;
b n 70&lt;BR /&gt;
&lt;BR /&gt;
Then the proc looks like&lt;BR /&gt;
PROC FREQ;&lt;BR /&gt;
  TABLES team*cancelled_flag/CHISQ;&lt;BR /&gt;
  WEIGHT count;&lt;BR /&gt;
  RUN;</description>
    <pubDate>Fri, 12 Sep 2008 20:39:40 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2008-09-12T20:39:40Z</dc:date>
    <item>
      <title>Statistics procedure for sample percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Statistics-procedure-for-sample-percentages/m-p/45622#M12023</link>
      <description>This is a SAS proc question, but at the core a statistics question.&lt;BR /&gt;
&lt;BR /&gt;
I've used proc ttest and other statistical procedures for comparing averages of different groups. But what proc would I use to compare "sample percentages"? I'm guessing it may depend on how my data is laid out, so I'll provide a couple possibilities...&lt;BR /&gt;
&lt;BR /&gt;
1. DETAILED data&lt;BR /&gt;
Team    Person_id   Cancelled_flag&lt;BR /&gt;
A              123                Y&lt;BR /&gt;
A              456                N&lt;BR /&gt;
B              789                Y&lt;BR /&gt;
B              555                Y&lt;BR /&gt;
&lt;BR /&gt;
2. Or SUMMARIZED data&lt;BR /&gt;
Team    Total_count       Cancelled_count&lt;BR /&gt;
A           100           40&lt;BR /&gt;
B           120           50</description>
      <pubDate>Fri, 12 Sep 2008 17:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Statistics-procedure-for-sample-percentages/m-p/45622#M12023</guid>
      <dc:creator>jawon</dc:creator>
      <dc:date>2008-09-12T17:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics procedure for sample percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Statistics-procedure-for-sample-percentages/m-p/45623#M12024</link>
      <description>PROC FREQ will do both of these.&lt;BR /&gt;
&lt;BR /&gt;
1) is the natural way.&lt;BR /&gt;
&lt;BR /&gt;
PRC FREQ; TABLES team*cancelled_flag/chisq;  RUN;&lt;BR /&gt;
&lt;BR /&gt;
2) requires data in slightly different format&lt;BR /&gt;
&lt;BR /&gt;
team cancelled_flag count&lt;BR /&gt;
a y 40&lt;BR /&gt;
a n 60&lt;BR /&gt;
b y 50&lt;BR /&gt;
b n 70&lt;BR /&gt;
&lt;BR /&gt;
Then the proc looks like&lt;BR /&gt;
PROC FREQ;&lt;BR /&gt;
  TABLES team*cancelled_flag/CHISQ;&lt;BR /&gt;
  WEIGHT count;&lt;BR /&gt;
  RUN;</description>
      <pubDate>Fri, 12 Sep 2008 20:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Statistics-procedure-for-sample-percentages/m-p/45623#M12024</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-09-12T20:39:40Z</dc:date>
    </item>
  </channel>
</rss>

