<?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: Testing the difference for a categorical variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Testing-the-difference-for-a-categorical-variable/m-p/679185#M205086</link>
    <description>&lt;P&gt;Proc Freq and Chi-sq would be one of my first choices. With the data you show you would need to include the MISSING option on the tables statement so that missing is treated as a category for the Complaint variable.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 15:30:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-25T15:30:45Z</dc:date>
    <item>
      <title>Testing the difference for a categorical variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Testing-the-difference-for-a-categorical-variable/m-p/679184#M205085</link>
      <description>&lt;P&gt;Hello, I have a binary/categorical variable - Location. I would like to see if there is a statistical difference between the presence of complaints between the two locations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For complaints I have the following values-&lt;/P&gt;&lt;P&gt;"." missing values denotes no complaint in the dataset.&lt;/P&gt;&lt;P&gt;1 denotes the presence of complaint&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was tilting towards using proc freq to do a chi-square test but wasn't sure. Can anyone please guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the sample data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input customernum complaint location$;&lt;BR /&gt;datalines;&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp;1&amp;nbsp; ND&lt;BR /&gt;200&amp;nbsp; &amp;nbsp;.&amp;nbsp; D&lt;BR /&gt;300&amp;nbsp; &amp;nbsp;1&amp;nbsp; D&lt;BR /&gt;400&amp;nbsp; &amp;nbsp;1&amp;nbsp; D&lt;BR /&gt;500&amp;nbsp; &amp;nbsp;.&amp;nbsp; ND&lt;BR /&gt;600&amp;nbsp; &amp;nbsp;1&amp;nbsp; ND&lt;BR /&gt;700&amp;nbsp; &amp;nbsp;1&amp;nbsp; D&lt;BR /&gt;800&amp;nbsp; &amp;nbsp;1&amp;nbsp; D&lt;BR /&gt;900&amp;nbsp; &amp;nbsp;.&amp;nbsp; ND&lt;BR /&gt;1000&amp;nbsp; 1&amp;nbsp; ND&lt;BR /&gt;1100&amp;nbsp; 1&amp;nbsp; D&lt;BR /&gt;1200&amp;nbsp; 1&amp;nbsp; D&lt;BR /&gt;1300&amp;nbsp; 1&amp;nbsp; D&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 15:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Testing-the-difference-for-a-categorical-variable/m-p/679184#M205085</guid>
      <dc:creator>ihtishamsultan</dc:creator>
      <dc:date>2020-08-25T15:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Testing the difference for a categorical variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Testing-the-difference-for-a-categorical-variable/m-p/679185#M205086</link>
      <description>&lt;P&gt;Proc Freq and Chi-sq would be one of my first choices. With the data you show you would need to include the MISSING option on the tables statement so that missing is treated as a category for the Complaint variable.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 15:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Testing-the-difference-for-a-categorical-variable/m-p/679185#M205086</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-25T15:30:45Z</dc:date>
    </item>
  </channel>
</rss>

