<?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-SQUARED TEST in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/771000#M37709</link>
    <description>&lt;P&gt;But which is "&lt;SPAN&gt;% of respondents who took the vaccine in 2019" and which is "% of respondents who took the vaccine in 2020"?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If either one of them is adult3, then you can't do this comparison because you have only one value for adult3.&amp;nbsp;&lt;/SPAN&gt;You don't seem to be grasping this point.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 19:11:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-09-28T19:11:52Z</dc:date>
    <item>
      <title>CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770765#M37679</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ewewee.png" style="width: 784px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64156i6C523D34A8D628B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="ewewee.png" alt="ewewee.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&gt;I have run a Ch-squareD test on 2 variables and that was the SAS output (above).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The categories for both variables are (yes vs no). why there isn't any rows depicting the (0 observations)? Can I run chi-squared test if one variable has 0 obs in one category?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 22:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770765#M37679</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-27T22:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770767#M37681</link>
      <description>&lt;P&gt;That output shows that you have no values of 0 or maybe "No" for the Adult3 variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you created Adult3 using code from other variable(s) then you may want to consider sharing that code along with the starting data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You said that "have run a Ch-squareD test". What did the LOG show?&lt;/P&gt;
&lt;P&gt;I suspect there is a note along the lines of :&lt;/P&gt;
&lt;PRE&gt;NOTE: No statistics are computed for adult3* adult11 because adult3 has less than 2 nonmissing levels.

&lt;/PRE&gt;
&lt;P&gt;If you do not have at least 2 non-missing&amp;nbsp; values for each variable you cannot run chi-square.&lt;/P&gt;
&lt;P&gt;Additionally if each cell has fewer than 5 you may well have unreliable results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Part of what goes on is that a chi-square calculated the expected cell count for each cell and calculates the test statistic from the difference of those expected counts with the actual counts. If a variable only has one value then there is no "expected" value for the other value(s) that do not appear in the data. So there is no valid test statistic to calculate.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 22:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770767#M37681</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-27T22:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770769#M37682</link>
      <description>&lt;P&gt;thanks. yes I got this message in the log:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: No statistics are computed for adult3* adult11 because adult3 has less than 2 nonmissing levels.&lt;/PRE&gt;&lt;P&gt;ok. int his case what test can I use if I want to detect the significance of the difference between the 2 variables?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 23:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770769#M37682</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-27T23:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770772#M37683</link>
      <description>&lt;P&gt;That message suggests that the only other value of your ADULT3 variable, other than Yes, is a missing value. That is, there are no observations with ADULT3=No. If you want to treat ADULT3=. (missing) as a valid level of that variable, then you can add the MISSING option in the TABLE statement. That will make a second row of the table with the counts from the observations where&amp;nbsp; ADULT3 is missing.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 02:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770772#M37683</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-09-28T02:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770865#M37689</link>
      <description>&lt;P&gt;No. You can't . You would get this error.&lt;/P&gt;
&lt;PRE&gt;data have;
input adult1 $ adult3 $ w;
cards;
Yes Yes 76
Yes No  0
No  Yes 1
No  No  0
;

proc freq data=have;
table adult3*adult1/chisq;
weight w/zero;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1632832420497.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64184iCAA26E6BA2E911C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1632832420497.png" alt="Ksharp_0-1632832420497.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;You would notice this message:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="proctitle"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="c proctitle"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Row or column sum zero. No statistics computed for this table.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770865#M37689</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-28T12:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770920#M37695</link>
      <description>&lt;P&gt;thank you so much. I did this but nothing changed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 15:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770920#M37695</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-28T15:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770922#M37697</link>
      <description>&lt;P&gt;thanks. do you suggest another test?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 15:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770922#M37697</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-28T15:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770941#M37700</link>
      <description>If nothing changed when you added the MISSING option, then you must not have any observations in the data with a value other than Yes for ADULT3. With no data for the ADULT3=No population, you cannot conduct a test.</description>
      <pubDate>Tue, 28 Sep 2021 16:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770941#M37700</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-09-28T16:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770962#M37702</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/287400"&gt;@sumah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;thanks. do you suggest another test?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you only have one value of adult3, then a Chi-square test is impossible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What hypothesis do you want to test? Please be specific. Normally, you test two things against each other, for example: the hypothesis is the percent of events in group 1 is equal to the percent of events in group 2. There are many other possibilities. What are your two percents (or two things) that you want to test against each other????&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 17:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770962#M37702</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-28T17:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770972#M37703</link>
      <description>Thank you. So I wanted to see if there’s a significant difference between % of respondents who took the vaccine in 2019 vs % of respondents who took the vaccine in 2020 and since it’s a categorical variable (yes vs no) I picked chi-squared test</description>
      <pubDate>Tue, 28 Sep 2021 17:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770972#M37703</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-28T17:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770974#M37704</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/287400"&gt;@sumah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you. So I wanted to see if there’s a significant difference between % of respondents who took the vaccine in 2019 vs % of respondents who took the vaccine in 2020 and since it’s a categorical variable (yes vs no) I picked chi-squared test&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This does not seem to have anything to do with your two variables named adult3 and adult11. Please explain further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 17:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770974#M37704</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-28T17:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770996#M37707</link>
      <description>&lt;P&gt;not quite sure I understand your reply. here is a screenshot&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Inkedewewee (1)_LI.jpg" style="width: 784px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64208i184EF13E86BC8C72/image-size/large?v=v2&amp;amp;px=999" role="button" title="Inkedewewee (1)_LI.jpg" alt="Inkedewewee (1)_LI.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 19:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/770996#M37707</guid>
      <dc:creator>sumah</dc:creator>
      <dc:date>2021-09-28T19:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/771000#M37709</link>
      <description>&lt;P&gt;But which is "&lt;SPAN&gt;% of respondents who took the vaccine in 2019" and which is "% of respondents who took the vaccine in 2020"?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If either one of them is adult3, then you can't do this comparison because you have only one value for adult3.&amp;nbsp;&lt;/SPAN&gt;You don't seem to be grasping this point.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 19:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/771000#M37709</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-28T19:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: CHI-SQUARED TEST</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/771116#M37714</link>
      <description>&lt;P&gt;I would suggest BINOMIAL Test since adult3 has only one level ,which means you can't do CHISQ Test .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
input adult1 $ adult3 $ w;
cards;
Yes Yes 76
No  Yes 1
;

proc freq data=have;
table adult1/binomial(p=0.02);
exact binomial;
weight w/zero;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 12:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CHI-SQUARED-TEST/m-p/771116#M37714</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-29T12:15:05Z</dc:date>
    </item>
  </channel>
</rss>

