<?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: How do i covert N and O to 1 and 0 ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498499#M132489</link>
    <description>&lt;P&gt;I am very much new in this. Using PROC Logistic.&lt;/P&gt;&lt;P&gt;How do I write&lt;SPAN&gt;&amp;nbsp;a CLASS statement to specify this is a categorical variable?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Sep 2018 17:59:33 GMT</pubDate>
    <dc:creator>serakuru1989</dc:creator>
    <dc:date>2018-09-24T17:59:33Z</dc:date>
    <item>
      <title>How do i covert N and O to 1 and 0 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498494#M132484</link>
      <description>&lt;P&gt;How do I covert N and O to 1 and 0 to do correlation and regression analysis? Please help me with this.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 17:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498494#M132484</guid>
      <dc:creator>serakuru1989</dc:creator>
      <dc:date>2018-09-24T17:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do i covert N and O to 1 and 0 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498496#M132486</link>
      <description>&lt;P&gt;What PROC are you using for regression?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's PROC LOGISTIC or GLM (and several others) you can use a CLASS statement to specify this is a categorical variable. You'll also want to specify the reference level but you don't need to convert them to 0/1 manually. Otherwise you can use IF/THEN statements to make a new variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/235824"&gt;@serakuru1989&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I covert N and O to 1 and 0 to do correlation and regression analysis? Please help me with this.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if varName = "N" then varName_Cat = 0;
else if varName = "O" then varName_Cat = 1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Sep 2018 17:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498496#M132486</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-24T17:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do i covert N and O to 1 and 0 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498499#M132489</link>
      <description>&lt;P&gt;I am very much new in this. Using PROC Logistic.&lt;/P&gt;&lt;P&gt;How do I write&lt;SPAN&gt;&amp;nbsp;a CLASS statement to specify this is a categorical variable?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 17:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498499#M132489</guid>
      <dc:creator>serakuru1989</dc:creator>
      <dc:date>2018-09-24T17:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do i covert N and O to 1 and 0 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498500#M132490</link>
      <description>Follow the documentation example then: &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_examples02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_examples02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;I would recommend running the documentation example first, make sure you understand it and then try it with your own data. The example doesn't do one thing I would recommend, set the class variables to have the REF parameterization.&lt;BR /&gt;&lt;BR /&gt;class &amp;lt;list of categorical variables&amp;gt; / param=ref;</description>
      <pubDate>Mon, 24 Sep 2018 18:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-covert-N-and-O-to-1-and-0/m-p/498500#M132490</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-24T18:01:45Z</dc:date>
    </item>
  </channel>
</rss>

