<?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 test for equality of proportions for only specific categories in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740064#M35958</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a data with 8 categories and their counts (freq). I am interested in only 2 specific categories.&amp;nbsp; So, I want to test equality of the proportions of only those 2 categories using chi square test in proc freq. However, to compute proportions, I need to consider total of all the 8 categories. How to do it?&lt;/P&gt;
&lt;P&gt;I have many such data sets and some of the interested categories have count &amp;lt; 5; so I need to use Fisher's exact test on those data sets. So, how to give option (Fisher or exact) in such case?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My SAS program with data is as follows. When I run it, it considers all the categories,which I don't want:&lt;/P&gt;
&lt;P&gt;DATA cfsstudy;&lt;BR /&gt;INPUT cfs $ count;&lt;BR /&gt;DATALINES;&lt;BR /&gt;midline 19&lt;BR /&gt;general 4&lt;BR /&gt;Parietal 1&lt;BR /&gt;frontal 1&lt;BR /&gt;central 3&lt;BR /&gt;occipital 2&lt;BR /&gt;TPO 2&lt;BR /&gt;multifocal 3&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;*this is the data it is saying has invalid data;&lt;/P&gt;
&lt;P&gt;proc freq data= cfsstudy;&lt;BR /&gt;weight count;&lt;BR /&gt;tables cfs /chisq;&lt;BR /&gt;* /exact;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I appreciate your feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 09 May 2021 21:30:03 GMT</pubDate>
    <dc:creator>sasuser3</dc:creator>
    <dc:date>2021-05-09T21:30:03Z</dc:date>
    <item>
      <title>test for equality of proportions for only specific categories</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740064#M35958</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a data with 8 categories and their counts (freq). I am interested in only 2 specific categories.&amp;nbsp; So, I want to test equality of the proportions of only those 2 categories using chi square test in proc freq. However, to compute proportions, I need to consider total of all the 8 categories. How to do it?&lt;/P&gt;
&lt;P&gt;I have many such data sets and some of the interested categories have count &amp;lt; 5; so I need to use Fisher's exact test on those data sets. So, how to give option (Fisher or exact) in such case?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My SAS program with data is as follows. When I run it, it considers all the categories,which I don't want:&lt;/P&gt;
&lt;P&gt;DATA cfsstudy;&lt;BR /&gt;INPUT cfs $ count;&lt;BR /&gt;DATALINES;&lt;BR /&gt;midline 19&lt;BR /&gt;general 4&lt;BR /&gt;Parietal 1&lt;BR /&gt;frontal 1&lt;BR /&gt;central 3&lt;BR /&gt;occipital 2&lt;BR /&gt;TPO 2&lt;BR /&gt;multifocal 3&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;*this is the data it is saying has invalid data;&lt;/P&gt;
&lt;P&gt;proc freq data= cfsstudy;&lt;BR /&gt;weight count;&lt;BR /&gt;tables cfs /chisq;&lt;BR /&gt;* /exact;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I appreciate your feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 May 2021 21:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740064#M35958</guid>
      <dc:creator>sasuser3</dc:creator>
      <dc:date>2021-05-09T21:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: test for equality of proportions for only specific categories</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740189#M35973</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;EM&gt;this is the data &lt;STRONG&gt;it is saying has invalid data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see any errors with the code you submitted. It correctly performs a chi-square test for the null hypothesis that the proportions are equal across all categories.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You ask how to compare only two categories. It's not clear what you mean. Do you mean that you want to compare&amp;nbsp; two groups such as general and central, ignoring the other observations? If so, you could add&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE cfs in ('general' 'central');&lt;/P&gt;
&lt;P&gt;and a binary test of proportions to the PROC FREQ call.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 14:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740189#M35973</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-05-10T14:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: test for equality of proportions for only specific categories</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740232#M35975</link>
      <description>&lt;P&gt;Your 8 categories are the categories of a multinomial variable. A comparison of the proportions in a multinomial variable is a comparison of dependent proportions. This can be done in PROC CATMOD or with specialized code in SAS/IML. Both are discussed and illustrated in &lt;A href="http://support.sas.com/kb/32609" target="_self"&gt;this note&lt;/A&gt; which also shows how confidence intervals for the proportions can be obtained.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 17:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740232#M35975</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-05-10T17:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: test for equality of proportions for only specific categories</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740244#M35976</link>
      <description>&lt;P&gt;Thanks. Yes, I want to compare only 2 categories, but by considering the total of all 8 categories, i.e 35 in this case and not just the total of those 2 categories. The proc freq with chisq considers total of only 2 categories.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, I want to test if there is a significant difference in the frequencies/counts of the 2 selected categories by considering the total observations. So, for the “general” and “central” categories, I want to consider the proportions 4/35 and 3/35 (and not 4/7, 3/7). Is there any way to test it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Sorry, the error message in my program was old.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 18:46:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740244#M35976</guid>
      <dc:creator>sasuser3</dc:creator>
      <dc:date>2021-05-10T18:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: test for equality of proportions for only specific categories</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740246#M35978</link>
      <description>&lt;P&gt;Thank you very much. Both methods work.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 19:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/test-for-equality-of-proportions-for-only-specific-categories/m-p/740246#M35978</guid>
      <dc:creator>sasuser3</dc:creator>
      <dc:date>2021-05-10T19:03:50Z</dc:date>
    </item>
  </channel>
</rss>

