<?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: Creating dummy variable with three values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643261#M191953</link>
    <description>&lt;P&gt;Almost!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value "2" requires that "payment handled" is 0, and "declaration rejected" &amp;gt; 0, and not only that&amp;nbsp;"declaration rejected" &amp;gt; 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i managed that by adding "and". Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 12:19:56 GMT</pubDate>
    <dc:creator>amsa1996</dc:creator>
    <dc:date>2020-04-27T12:19:56Z</dc:date>
    <item>
      <title>Creating dummy variable with three values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643228#M191934</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a dummy variable as my target variable where 0 indicates that the event "payment handled" has not occured, and 1 that is have occured. Furthermore, i want to add a value "2" in my target variable indicating that the event "payment handled" has not occured due to another event called "decleration rejected". This means that the event has to have a value &amp;lt;0 at decleration rejected, and 0 at payment handled. Both events are extracted from the same column named, activity_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643228#M191934</guid>
      <dc:creator>amsa1996</dc:creator>
      <dc:date>2020-04-27T12:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating dummy variable with three values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643229#M191935</link>
      <description>&lt;P&gt;It has to have a value &amp;gt;0 at decleration rejected**&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643229#M191935</guid>
      <dc:creator>amsa1996</dc:creator>
      <dc:date>2020-04-27T10:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating dummy variable with three values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643239#M191939</link>
      <description>&lt;P&gt;If I understand you correctly than add a line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum(activity_id="decleration rejected")  as rejected /* new dummy */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then add a new step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tuetravelexpenses_cases;
 set tuetravelexpenses_cases;
       if rejected &amp;gt; 0 then target_variable=2;
      *drop rejected;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643239#M191939</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-27T10:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating dummy variable with three values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643261#M191953</link>
      <description>&lt;P&gt;Almost!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value "2" requires that "payment handled" is 0, and "declaration rejected" &amp;gt; 0, and not only that&amp;nbsp;"declaration rejected" &amp;gt; 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i managed that by adding "and". Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-dummy-variable-with-three-values/m-p/643261#M191953</guid>
      <dc:creator>amsa1996</dc:creator>
      <dc:date>2020-04-27T12:19:56Z</dc:date>
    </item>
  </channel>
</rss>

