<?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 Class statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282746#M57507</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When can we use class statement? If I have a binary variable and using Proc Logistic, should I use class statement for that variable?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 17:31:17 GMT</pubDate>
    <dc:creator>wajmsu</dc:creator>
    <dc:date>2016-07-07T17:31:17Z</dc:date>
    <item>
      <title>Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282746#M57507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When can we use class statement? If I have a binary variable and using Proc Logistic, should I use class statement for that variable?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282746#M57507</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-07-07T17:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282752#M57509</link>
      <description>&lt;P&gt;The CLASS statement is used to declare categorical (as opposed to interval/continuous) predictor variables. Generally nominal variables (males/female, yes/no, event/nonevent) are treated as categorical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect060.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect060.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any predictor variables that have type=character must be declared as class variables or you will get an error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ray&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 18:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282752#M57509</guid>
      <dc:creator>rayIII</dc:creator>
      <dc:date>2016-07-07T18:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282758#M57511</link>
      <description>&lt;P&gt;Hi Ray,&lt;/P&gt;&lt;P&gt;Thanks for the response. Below are three different codes and I need guidance:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Which code is correct to use, as the third one does not have class statement in it?&lt;/LI&gt;&lt;LI&gt;according to my understanding, the third code should use last categoryof&amp;nbsp;CMV_ca_2_1 (category 2) as reference; but the output of this code is the same as that of the output no.2 where I defined reference as 1 (which is not last category).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=pe.matchedata_21;&lt;BR /&gt;strata group;&lt;BR /&gt;class CMV_ca_2_1 (ref='2');&lt;BR /&gt;model PEstatus (event='1')= CMV_ca_2_1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc logistic data=pe.matchedata_21;&lt;BR /&gt;strata group;&lt;BR /&gt;class CMV_ca_2_1 (ref='1');&lt;BR /&gt;model PEstatus (event='1')= CMV_ca_2_1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc logistic data=pe.matchedata_21;&lt;BR /&gt;strata group;&lt;BR /&gt;model PEstatus (event='1')= CMV_ca_2_1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 18:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282758#M57511</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-07-07T18:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282767#M57514</link>
      <description>&lt;P&gt;Use code #2 where you get what you want without having to rely on obscure default rules. That explicit coding will also be much easier to interpret 6 months from now.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 19:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282767#M57514</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-07-07T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282773#M57516</link>
      <description>&lt;P&gt;In general you'll also want to specify your parameterization method. I don't know if it matters for 0/1 coding, but as suggested before, being explicit doesn't hurt. And defaults can change between versions of SAS so it's good to be explicit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=pe.matchedata_21;
strata group;
class CMV_ca_2_1 (ref='1') / &lt;STRONG&gt;param=ref;&lt;/STRONG&gt;
model PEstatus (event='1') = CMV_ca_2_1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jul 2016 19:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282773#M57516</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-07T19:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282791#M57522</link>
      <description>&lt;P&gt;Thanks PGStats and Reeza!&lt;/P&gt;&lt;P&gt;I wanted an expert endorsement to my understanding which I got. Just to reconfirm, this is true even for a binary variable to use the class statement with explicit reference indication.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282791#M57522</guid>
      <dc:creator>wajmsu</dc:creator>
      <dc:date>2016-07-07T20:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Class statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282800#M57526</link>
      <description>&lt;P&gt;It's true that you can and should use Class statement for binary variables, but its not a requirement.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 21:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-statement/m-p/282800#M57526</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-07T21:04:25Z</dc:date>
    </item>
  </channel>
</rss>

