<?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 Grouping variables to create new variables SAS Enterprise Miner in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243245#M3569</link>
    <description>&lt;P&gt;What is the best way to group variables into a new variable (or replace existing one) in SAS Miner?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the variable "color" has 4 values: Red, Green, Black, and White. I want to create a new variable "newcolor" which has values "No Color" for Black and White, and "Color" for Red and Green.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2016 16:27:30 GMT</pubDate>
    <dc:creator>wave43</dc:creator>
    <dc:date>2016-01-13T16:27:30Z</dc:date>
    <item>
      <title>Grouping variables to create new variables SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243245#M3569</link>
      <description>&lt;P&gt;What is the best way to group variables into a new variable (or replace existing one) in SAS Miner?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the variable "color" has 4 values: Red, Green, Black, and White. I want to create a new variable "newcolor" which has values "No Color" for Black and White, and "Color" for Red and Green.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 16:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243245#M3569</guid>
      <dc:creator>wave43</dc:creator>
      <dc:date>2016-01-13T16:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping variables to create new variables SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243439#M3574</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you want to do is creating a new variable by grouping levels (!)&amp;nbsp;of a nominal variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS Enterprise Miner, this can be done in multiple ways:&lt;/P&gt;
&lt;P&gt;1. Replacement Node&lt;/P&gt;
&lt;P&gt;2. Transform Variables node&lt;/P&gt;
&lt;P&gt;3. entering code in the score code pane of the Code node&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would start with the Replacement node:&lt;/P&gt;
&lt;P&gt;- Put the 'Default Limits Method' for interval variables on 'NONE'.&lt;/P&gt;
&lt;P&gt;- Open the Replacement Editor for Class Variables.&lt;/P&gt;
&lt;P&gt;- Enter replacement values in the only column you can edit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new variable will have the same name as the source variable but with an added prefix (I believe it's 'REP_' for the replacement node). The original source variable will get a 'rejected' role and the new derived variable will get an 'input' role (unless you are replacing the target variable, then the new variable will get the 'target' role).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 10:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243439#M3574</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2016-01-14T10:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping variables to create new variables SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243475#M3576</link>
      <description>&lt;P&gt;Thank you. The replacement node was straight forward. You saved me from reloading my data again.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 14:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Grouping-variables-to-create-new-variables-SAS-Enterprise-Miner/m-p/243475#M3576</guid>
      <dc:creator>wave43</dc:creator>
      <dc:date>2016-01-14T14:59:18Z</dc:date>
    </item>
  </channel>
</rss>

