<?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: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406134#M279232</link>
    <description>&lt;P&gt;Right now you're using your own data,&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;wdp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;newzhang&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, try using a data set from SASHELP so we can run the code. We can't right now because we don't have your data. Or you can use data from the documentation.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2017 20:17:10 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-10-20T20:17:10Z</dc:date>
    <item>
      <title>Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406101#M279228</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyfreq data=wdp.newzhang;

 

tables sex*lang / wchisq; 

 

weight weight_3; 

 

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have encountered a major issue when attempting to conduct a wald chi-square test of independence using survey data. Specifically, SAS would not provide the results of the wald chi-square test in the output table, which I do not understand. Therefore, I would greatly appreciate it if a knowledgeable SAS user with a certain level of experience with conducting statistical analyses using survey data could provide a feasible solution on this dilemma. Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below a copy of the SAS code that I have attempted to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT color="navy" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="navy" face="Courier New" size="2"&gt;&lt;STRONG&gt;surveyfreq&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="blue" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=wdp.newzhang;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="blue" face="Courier New" size="2"&gt;tables&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sex*lang / &lt;/FONT&gt;&lt;FONT color="blue" face="Courier New" size="2"&gt;wchisq&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="blue" face="Courier New" size="2"&gt;weight&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; weight_3; &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="navy" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Best, &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Lisa&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Oct 2017 19:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406101#M279228</guid>
      <dc:creator>yli33</dc:creator>
      <dc:date>2017-10-20T19:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406107#M279229</link>
      <description>&lt;P&gt;Please explain this part in more detail:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;SAS would not provide the results of the wald chi-square test in the output table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does that mean it wasn't calculated? or displayed? Or do you want it in an output data set to use somewhere else and don't know how to do that? It would also help if you could replicate your issue using either a SASHELP data set (CLASS, CAR or HEART are good ones) so we can run the code and replicate the issue. This way we can determine if it's a data or code issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 19:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406107#M279229</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-20T19:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406127#M279230</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thank you for responding. I apologize for the confusion on the unavailable&lt;BR /&gt;SAS output for the Wald Chi-Square Test that I have mentioned earlier.&lt;BR /&gt;Specifically, the results of the Wald chi-square would not display when&lt;BR /&gt;running the command. I am only able to view the 2-way weighted frequency&lt;BR /&gt;table as the only displayed output.&lt;BR /&gt;&lt;BR /&gt;I am actually a beginner in SAS and am not really familiar with the SASHELP&lt;BR /&gt;datasets that you have specified. Nevertheless, hopefully you would be able&lt;BR /&gt;to provide a solution based on my clarification above. If not, I would&lt;BR /&gt;greatly appreciate it if you describe in more detail on the steps involved&lt;BR /&gt;to replicate a SASHELP dataset. Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406127#M279230</guid>
      <dc:creator>yli33</dc:creator>
      <dc:date>2017-10-20T20:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406131#M279231</link>
      <description>Actually, I am not even sure if SAS even calculated a wald chi-square statistic and associated p-value, needless to say display the results in the output table. Also, would it be possible for you to inform me on the steps involved to replicate my current issue using a SASHELP dataset. Thanks again!</description>
      <pubDate>Fri, 20 Oct 2017 20:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406131#M279231</guid>
      <dc:creator>yli33</dc:creator>
      <dc:date>2017-10-20T20:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406134#M279232</link>
      <description>&lt;P&gt;Right now you're using your own data,&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;wdp&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;newzhang&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, try using a data set from SASHELP so we can run the code. We can't right now because we don't have your data. Or you can use data from the documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406134#M279232</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-20T20:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406143#M279233</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for responding again. Nevertheless, I do not know whether the SASHELP datasets that you have specified earlier (e.g. class, heart, etc)&amp;nbsp;are survey-based datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you just want for me to include the same commands using another dataset using different variables than the ones that I am currently using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyfreq data=sashelp.class;&lt;/P&gt;&lt;P&gt;tables sex*lang/wchisq;&lt;/P&gt;&lt;P&gt;weight weight_3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406143#M279233</guid>
      <dc:creator>yli33</dc:creator>
      <dc:date>2017-10-20T20:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406146#M279234</link>
      <description>&lt;P&gt;Sort of. Check your log, are you seeing this message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE: Chi-square tests cannot be computed for the table of Sex by&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Age because at least one table cell has 0 frequency.&lt;/STRONG&gt;&lt;BR /&gt;NOTE: PROCEDURE SURVEYFREQ used (Total process time):&lt;BR /&gt; real time 0.27 seconds&lt;BR /&gt; cpu time 0.04 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406146#M279234</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-20T20:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dilemma: Conducting Wald Chi-Square Test Using Proc Surveyfreq Statement on SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406149#M279235</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I do see the following comments made on the SAS log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Chi-square tests cannot be computed for the table of SEX by LANG because at least one table&lt;/P&gt;&lt;P&gt;cell has 0 frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Frankly, this dataset has quite a lot of missing values. Nevertheless, I thought that using weight would have compensated for the missing values by adjusting the data to be more representative of the population. Could you provide a solution to this issue? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 20:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dilemma-Conducting-Wald-Chi-Square-Test-Using-Proc-Surveyfreq/m-p/406149#M279235</guid>
      <dc:creator>yli33</dc:creator>
      <dc:date>2017-10-20T20:43:11Z</dc:date>
    </item>
  </channel>
</rss>

