<?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: Enterprise Miner - how to change variable role in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Enterprise-Miner-how-to-change-variable-role/m-p/502024#M7402</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238542"&gt;@RV4&lt;/a&gt;&amp;nbsp;welcome to the SAS Community forums.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've modified your subject line and moved your post to a better location. Posting it at the end of someone else's solved questions means it's unlikely to be seen at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're searching documentation/google you can look for 'how to change a variable role in SAS EM' to find options. A good place to check is lexjansen.com.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other method - recode your variables using the recode task, not a code node and see if lets you change it there while creating the new variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, hopefully you get a response soon.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 19:21:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-05T19:21:18Z</dc:date>
    <item>
      <title>Enterprise Miner - how to change variable role</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Enterprise-Miner-how-to-change-variable-role/m-p/502012#M7401</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EMWS1.datosreg;
set &amp;amp;EM_IMPORT_DATA;
estadoCivilNew = estadoCivil;
if estadoCivil = 'CASADO C/SEPARACIÓN DE BIENES' then estadoCivilNew = 1;
else if estadoCivil = 'CASADO CON GANANCIA' then estadoCivilNew = 2;
else if estadoCivil = 'CASADO S/SEPARACIÓN DE BIENES' then estadoCivilNew = 3;
else if estadoCivil = 'SOLTERO' then estadoCivilNew = 4;
else if estadoCivil = 'VIUDO' then estadoCivilNew = 5;
else if estadoCivil = 'SEPARADO' then estadoCivilNew = 6;
else if estadoCivil = 'DIVORCIADO (A)' then estadoCivilNew = 7;
else estadoCivilNew = 8;

estudiosNew = estudios;
if estudios = 'UNIVERSITARIA' then estudiosNew = 1;
if estudios = 'SECUNDARIA' then estudiosNew = 2;
if estudios = 'PRIMARIA' then estudiosNew = 3;
if estudios = 'No Informado' then estudiosNew = 4;
else estudiosNew = 5;

tipopropiedadNew = tipoPropiedad;
if tipoPropiedad = 'PROPIA CON DEUDA' then tipopropiedadNew = 1;
else if tipoPropiedad = 'PROPIA SIN DEUDA' then tipopropiedadNew = 2;
else if tipoPropiedad = 'DE UN FAMILIAR' then tipopropiedadNew = 3;
else if tipoPropiedad = 'ARRENDADA' then tipopropiedadNew = 4;
else if tipoPropiedad = 'EMPLEADOR' then tipopropiedadNew = 5;
else if tipoPropiedad = 'No Informado' then tipopropiedadNew = 6;
else if tipoPropiedad = 'FISCAL' then tipopropiedadNew = 7;
else tipopropiedadNew = 8;


run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got a question (quite new to SAS Miner). I have a nominal variable in SAS which is basically the&amp;nbsp;marital status: (married, single, divorced etc.) -&amp;gt; I would like to do a logistic regression and therefore have to transform the variable into a Interval variable. So what I did is following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data EMWS1.datosreg;&lt;BR /&gt;set &amp;amp;EM_IMPORT_DATA;&lt;BR /&gt;estadoCivilNew = estadoCivil;&lt;BR /&gt;if estadoCivil = 'married' then estadoCivilNew = 1;&lt;BR /&gt;else if estadoCivil = 'single' then estadoCivilNew = 2;&lt;BR /&gt;else estadoCivilNew = 3;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;However my new variable "estadoCivilNew" is still considered nominal, or anything else but interval. Anyone knows how to tackle my problem maybe in an easier way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much &amp;amp; best regards&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_problem.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23824iC31093A512F1B842/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_problem.png" alt="sas_problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 19:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Enterprise-Miner-how-to-change-variable-role/m-p/502012#M7401</guid>
      <dc:creator>RV4</dc:creator>
      <dc:date>2018-10-05T19:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Miner - how to change variable role</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Enterprise-Miner-how-to-change-variable-role/m-p/502024#M7402</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238542"&gt;@RV4&lt;/a&gt;&amp;nbsp;welcome to the SAS Community forums.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've modified your subject line and moved your post to a better location. Posting it at the end of someone else's solved questions means it's unlikely to be seen at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're searching documentation/google you can look for 'how to change a variable role in SAS EM' to find options. A good place to check is lexjansen.com.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other method - recode your variables using the recode task, not a code node and see if lets you change it there while creating the new variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, hopefully you get a response soon.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 19:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Enterprise-Miner-how-to-change-variable-role/m-p/502024#M7402</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-05T19:21:18Z</dc:date>
    </item>
  </channel>
</rss>

