<?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 between variable and 1 level of another variable in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461438#M5491</link>
    <description>&lt;P&gt;I merged the identical questions.&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 22:51:18 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-05-10T22:51:18Z</dc:date>
    <item>
      <title>Chi square between variable and 1 level of another variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461399#M5488</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would i test for an association between a variable and just 1 level of another variable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only have the 2x2 table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code for testing between two variables. Thanks for any help!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA PBP2;
DO a=1 TO 2;
DO b=1 TO 2;
INPUT count @@;
OUTPUT;
END;
END;
CARDS;
146 54 159 41
;
RUN;
PROC FREQ;
TITLE6 "Output" ;
WEIGHT count;
TABLES a*b /CHISQ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 May 2018 18:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461399#M5488</guid>
      <dc:creator>iressa131</dc:creator>
      <dc:date>2018-05-10T18:56:22Z</dc:date>
    </item>
    <item>
      <title>chi square between variable and 1 level of another</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461401#M5489</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would i test for an association between a variable and just 1 level of another variable?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only have the 2x2 table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code for testing between two variables. Thanks for any help!&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; PBP2&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
DO a&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; TO &lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
DO b&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; TO &lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;INPUT&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;count&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
OUTPUT&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
END&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
END&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token datalines"&gt;&lt;SPAN class="token keyword"&gt;CARDS&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token data string"&gt;146 54 159 41&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;RUN&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;PROC&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;FREQ&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
TITLE6 &lt;SPAN class="token string"&gt;"Output"&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;WEIGHT&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;count&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;TABLES&lt;/SPAN&gt; a&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;b &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;CHISQ&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;RUN&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 May 2018 18:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461401#M5489</guid>
      <dc:creator>iressa131</dc:creator>
      <dc:date>2018-05-10T18:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: chi square between variable and 1 level of another</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461415#M5490</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192118"&gt;@iressa131&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would i test for an association between a variable and just 1 level of another variable?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I only have the 2x2 table.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I am not sure what you mean by that type of test? What exactly would you be testing for? In your example which level of which variable are you testing against in the other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that your code does not run as posted.&lt;/P&gt;
&lt;P&gt;The CARDS and DATALINE statements must 1) have the Cards or datalines as the only statement on one line of code and 2) the ; or ;;;; in the case of Cards4 or equivalent must be on a line by itself, not at the end or a row of data.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 20:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461415#M5490</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-10T20:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Chi square between variable and 1 level of another variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461438#M5491</link>
      <description>&lt;P&gt;I merged the identical questions.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 22:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Chi-square-between-variable-and-1-level-of-another-variable/m-p/461438#M5491</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-10T22:51:18Z</dc:date>
    </item>
  </channel>
</rss>

