<?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: Chi-Square WARNING in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800265#M39363</link>
    <description>&lt;P&gt;Use FISHER exact test instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_syntax08.htm#procstat.freq.freqexactopt" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_syntax08.htm#procstat.freq.freqexactopt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Title "Chi-Square of Deaths by Age";
PROC FREQ data=AgeDeath;
TABLE age*wave / FISHER CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;
format age agegrp.;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416743"&gt;@CatPaws&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi! I am doing a Chi-Square test to determine if the deaths are equal between two populations by age group. However, I get the warning below, which I'm not surprised about because some of the age groups had 0 deaths or &amp;gt;5. How do I proceed?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_1-1646366801325.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69132i4C84802C23E35FA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_1-1646366801325.png" alt="CatPaws_1-1646366801325.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_0-1646366476870.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69131iEF7411CDABBFAFA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_0-1646366476870.png" alt="CatPaws_0-1646366476870.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Title "Chi-Square of Deaths by Age";&lt;BR /&gt;PROC FREQ data=AgeDeath;&lt;BR /&gt;TABLE age*wave / CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;&lt;BR /&gt;format age agegrp.;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 18:26:26 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-03-04T18:26:26Z</dc:date>
    <item>
      <title>Chi-Square WARNING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800056#M39351</link>
      <description>&lt;P&gt;Hi! I am doing a Chi-Square test to determine if the deaths are equal between two populations by age group. However, I get the warning below, which I'm not surprised about because some of the age groups had 0 deaths or &amp;gt;5. How do I proceed?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_1-1646366801325.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69132i4C84802C23E35FA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_1-1646366801325.png" alt="CatPaws_1-1646366801325.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_0-1646366476870.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69131iEF7411CDABBFAFA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_0-1646366476870.png" alt="CatPaws_0-1646366476870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Title "Chi-Square of Deaths by Age";&lt;BR /&gt;PROC FREQ data=AgeDeath;&lt;BR /&gt;TABLE age*wave / CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;&lt;BR /&gt;format age agegrp.;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:34:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800056#M39351</guid>
      <dc:creator>CatPaws</dc:creator>
      <dc:date>2022-03-04T14:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-Square error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800064#M39352</link>
      <description>&lt;P&gt;First thing, that is &lt;STRONG&gt;not an error.&lt;/STRONG&gt; What that warning is doing is telling the person that requested the analysis that it may not be valid for the intended purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to proceed depends a great deal on why you were running a chi-square with those groups to begin with. Such as what are "wave2" and "wave3" and why are testing age groups among them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One approach might involve collapsing age groups so all of the &amp;lt;1 to 9 are in one group, easily done with a different format definition if the agegrp. format is at all how I think it might be defined. Then you would only have one cell with fewer than 5 count though SAS will still provide a warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some other definition(s) of the groups might be more appropriate. How/why were the age groups created that way to begin with?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 05:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800064#M39352</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-04T05:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-Square error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800116#M39353</link>
      <description>&lt;P&gt;What is your ERROR information ? There is not error in LOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
input row col count;
cards;
1 1 0
1 2 1
2 1 0
2 2 2
3 1 1
3 2 3
4 1 3
4 2 7
5 1 78
5 2 113
;

proc freq data=have;
table row*col/CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;
weight count/zero;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Mar 2022 12:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800116#M39353</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-04T12:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-Square WARNING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800216#M39358</link>
      <description>&lt;P&gt;In addition to considering the consolidation of some categories, you might want to explore the EXACT option (see the documentation for PROC FREQ for more about this).&amp;nbsp; That may take a long time computing as your last age category contains over 10 times as many subjects as the first four categories.&amp;nbsp; Additionally, that kind of imbalance is a great recipe for misleading values of the chi squared statistic, as the EXPECTED part for each cell is determined almost entirely by the ratio in that single category.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 15:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800216#M39358</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-03-04T15:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-Square WARNING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800265#M39363</link>
      <description>&lt;P&gt;Use FISHER exact test instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_syntax08.htm#procstat.freq.freqexactopt" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_syntax08.htm#procstat.freq.freqexactopt&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Title "Chi-Square of Deaths by Age";
PROC FREQ data=AgeDeath;
TABLE age*wave / FISHER CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;
format age agegrp.;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416743"&gt;@CatPaws&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi! I am doing a Chi-Square test to determine if the deaths are equal between two populations by age group. However, I get the warning below, which I'm not surprised about because some of the age groups had 0 deaths or &amp;gt;5. How do I proceed?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_1-1646366801325.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69132i4C84802C23E35FA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_1-1646366801325.png" alt="CatPaws_1-1646366801325.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CatPaws_0-1646366476870.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69131iEF7411CDABBFAFA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CatPaws_0-1646366476870.png" alt="CatPaws_0-1646366476870.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Title "Chi-Square of Deaths by Age";&lt;BR /&gt;PROC FREQ data=AgeDeath;&lt;BR /&gt;TABLE age*wave / CHISQ EXPECTED DEVIATION NOROW NOCOL NOPERCENT;&lt;BR /&gt;format age agegrp.;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 18:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/800265#M39363</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-03-04T18:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-Square WARNING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/801190#M39391</link>
      <description>&lt;P&gt;It may be that a categorical test is not appropriate to these data. PROC NPAR1WAY seems more appropriate for testing the difference between waves on age.&amp;nbsp; Though it will work with grouped ages, it would be even better if you have discrete ages.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 21:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-Square-WARNING/m-p/801190#M39391</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2022-03-09T21:06:23Z</dc:date>
    </item>
  </channel>
</rss>

