<?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 Chi-square for categorical variable with more than 2 responses in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/520225#M26473</link>
    <description>&lt;P&gt;I am trying to perform a chi-square test on a categorical variable with more that two responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example Variable Age has three responses:&lt;/P&gt;&lt;P&gt;0: 18-29&lt;/P&gt;&lt;P&gt;1: 30-39&lt;/P&gt;&lt;P&gt;2: 40-49&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to perform the Chi-square for only the 30-39 age group between my two cohorts. I am sure there is a simple code for this, but I as of yet have been unable to find it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 02:52:51 GMT</pubDate>
    <dc:creator>ssulli11</dc:creator>
    <dc:date>2018-12-11T02:52:51Z</dc:date>
    <item>
      <title>Chi-square for categorical variable with more than 2 responses</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/520225#M26473</link>
      <description>&lt;P&gt;I am trying to perform a chi-square test on a categorical variable with more that two responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example Variable Age has three responses:&lt;/P&gt;&lt;P&gt;0: 18-29&lt;/P&gt;&lt;P&gt;1: 30-39&lt;/P&gt;&lt;P&gt;2: 40-49&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to perform the Chi-square for only the 30-39 age group between my two cohorts. I am sure there is a simple code for this, but I as of yet have been unable to find it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 02:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/520225#M26473</guid>
      <dc:creator>ssulli11</dc:creator>
      <dc:date>2018-12-11T02:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-square for categorical variable with more than 2 responses</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/520244#M26475</link>
      <description>&lt;P&gt;You can restrict testing to a subset of your data with a WHERE statement. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=myData;&lt;/P&gt;
&lt;P&gt;where age = 1;&lt;/P&gt;
&lt;P&gt;.... some test ...&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 04:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/520244#M26475</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-12-11T04:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-square for categorical variable with more than 2 responses</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/521814#M26500</link>
      <description>&lt;P&gt;Thank you for your response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, this is how I originally thought to complete this as well.&amp;nbsp; However, the results are only giving me the table, not the chi-quare results with this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data = have;&lt;BR /&gt;where age2 = 1;&lt;BR /&gt;tables overlap2*age2 / chisq nocol nopercent;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 18:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/521814#M26500</guid>
      <dc:creator>ssulli11</dc:creator>
      <dc:date>2018-12-16T18:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Chi-square for categorical variable with more than 2 responses</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/521879#M26504</link>
      <description>&lt;P&gt;Remove the age2 variable from the TABLES statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc freq data = have;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where age2 = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tables overlap2 / chisq nocol nopercent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 11:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Chi-square-for-categorical-variable-with-more-than-2-responses/m-p/521879#M26504</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-12-17T11:14:08Z</dc:date>
    </item>
  </channel>
</rss>

