<?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 How to handle missing value in SAS Enterprise Miner in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-handle-missing-value-in-SAS-Enterprise-Miner/m-p/554452#M7780</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a builidng model in SAS enterprise miner by using logistic regression. This is the first time I am using miner and taken Titanic dataset from Kaggle. I have a column Age which has 19% missing value. Also, it has a column name called travelled class. I need to assign mean in place of missing value according to the class. For example, If people travelled in the first class I then I need to assign 37. If it is the second class then it is 29 and 24 if people travelled in third class.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do in impute but it doesn't have an option to fill three values in the 'Age' column. Any suggestion about how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhilip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Apr 2019 05:04:23 GMT</pubDate>
    <dc:creator>sdhilip</dc:creator>
    <dc:date>2019-04-27T05:04:23Z</dc:date>
    <item>
      <title>How to handle missing value in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-handle-missing-value-in-SAS-Enterprise-Miner/m-p/554452#M7780</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a builidng model in SAS enterprise miner by using logistic regression. This is the first time I am using miner and taken Titanic dataset from Kaggle. I have a column Age which has 19% missing value. Also, it has a column name called travelled class. I need to assign mean in place of missing value according to the class. For example, If people travelled in the first class I then I need to assign 37. If it is the second class then it is 29 and 24 if people travelled in third class.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do in impute but it doesn't have an option to fill three values in the 'Age' column. Any suggestion about how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhilip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 05:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-handle-missing-value-in-SAS-Enterprise-Miner/m-p/554452#M7780</guid>
      <dc:creator>sdhilip</dc:creator>
      <dc:date>2019-04-27T05:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle missing value in SAS Enterprise Miner</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-handle-missing-value-in-SAS-Enterprise-Miner/m-p/556070#M7791</link>
      <description>&lt;P&gt;You would need to do it in a SAS Code node.&amp;nbsp; Here is example code to impute Age with its mean within each level of TravClass:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc means data=&amp;amp;em_import_data mean stackodsoutput;
   class TravClass; /* change this to name of class variable, here and below */
   var age; /* change this to name of age variable, here and below */
   ods output summary=outmean;
run;

proc print data=outmean; run;

filename flow "&amp;amp;EM_FILE_EMflowSCORECODE";
filename pub "&amp;amp;EM_FILE_EMPUBLISHSCORECODE";

data _null_;
  set outmean end=last;
  file flow;
  if _n_=1 then do;
    put "if AGE = . then do;";
    put " if TravClass='" TravClass "' then ";
  end;
  else do;
    put " else if TravClass ='" TravClass "' then ";
  end;
  put " IMP_AGE = " mean ";";
  if last then do;
    put "end;";
    put "else IMP_AGE = AGE;";
  end;
run;

%em_copyfile(infref=flow, outfref=pub);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 May 2019 19:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-handle-missing-value-in-SAS-Enterprise-Miner/m-p/556070#M7791</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2019-05-03T19:30:10Z</dc:date>
    </item>
  </channel>
</rss>

