<?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: Missing Value Macro in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433394#M6649</link>
    <description>&lt;P&gt;Are you kidding? Three requests, all without any example data or the smallest effort shown, that you tried anything.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 06:08:16 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-02-02T06:08:16Z</dc:date>
    <item>
      <title>Missing Value Macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433385#M6644</link>
      <description>&lt;P&gt;Hi, I am looking for a macro which needs to do some tasks as mentioned below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should check all missing values in the dataset and then drop the variables with high missing values and at the same time impute those numeric and character missing values based on some conditions like in model development we used to follow something like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone have this macro, please share with us...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 05:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433385#M6644</guid>
      <dc:creator>dsp1</dc:creator>
      <dc:date>2018-02-02T05:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Value Macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433394#M6649</link>
      <description>&lt;P&gt;Are you kidding? Three requests, all without any example data or the smallest effort shown, that you tried anything.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 06:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433394#M6649</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-02-02T06:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Value Macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433395#M6650</link>
      <description>&lt;P&gt;I am not kidding Andreas. I am new to SAS macros.......that's why asking...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 06:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433395#M6650</guid>
      <dc:creator>dsp1</dc:creator>
      <dc:date>2018-02-02T06:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Value Macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433419#M6654</link>
      <description>&lt;P&gt;If you are serious about this, here's what you need to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write a program that works, but doesn't use macros at all.&amp;nbsp; It has to handle at least one version of the requirements.&amp;nbsp; For example, it might handle missing numeric values only.&amp;nbsp; It would calculate the percentage of missing values for every numeric variable, and identify those that are missing at least 20% of the time.&amp;nbsp; It would replace numerics that have a missing value rate of less than 20% with the mean value for that variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Turning that into a macro would then mean adding flexibility ... perhaps the 20% cutoff needs to be a macro parameter that can be adjusted when calling the macro.&amp;nbsp; Perhaps using the mean to replace missing values could be switched to be the median.&amp;nbsp; But it is up to you to come up with the non-macro code that accomplishes the task in some form or another.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 08:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433419#M6654</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-02T08:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Value Macro</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433512#M6662</link>
      <description>&lt;P&gt;&lt;BR /&gt;/* impute missing values *&lt;/P&gt;
&lt;P&gt;data class;&lt;BR /&gt; set sashelp.class;&lt;BR /&gt; if rand('uniform')&amp;lt;0.4 then call missing(sex);&lt;BR /&gt; if rand('uniform')&amp;lt;0.2 then call missing(height);&lt;BR /&gt;run;&lt;BR /&gt;proc mi data=class seed=1305417 nimpute=1 out=outex4;&lt;BR /&gt;class sex ;&lt;BR /&gt;fcs nbiter=100 ;&lt;BR /&gt;var sex age height weight;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* Pick up variable by PROC PLS &lt;BR /&gt;* ods output VariableImportancePlot= VariableImportancePlot;&lt;BR /&gt;proc pls data=class missing=em * nfact=2 plot=(ParmProfiles VIP) * cv=split details cvtest(seed=12345);&lt;BR /&gt; class sex;&lt;BR /&gt; model age=weight height sex;&lt;BR /&gt;* output out=x predicted=p;&lt;BR /&gt;run;&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 12:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Missing-Value-Macro/m-p/433512#M6662</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-02-02T12:58:41Z</dc:date>
    </item>
  </channel>
</rss>

