<?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: Removing outliers in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453304#M69871</link>
    <description>&lt;P&gt;Yeah, that's not a good rule for identifying outliers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a different logic.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Apr 2018 17:22:38 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-11T17:22:38Z</dc:date>
    <item>
      <title>Removing outliers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453068#M69855</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Using proc uni-variate procedure, I found that the following Obs are outliers:&lt;/P&gt;&lt;P&gt;proc univariate;&lt;BR /&gt;var resids;&lt;BR /&gt;qqplot resids;&lt;BR /&gt;run;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;SAS Output&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Extreme ObservationsLowest HighestValue Obs Value Obs &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-8.40972&lt;/TD&gt;&lt;TD&gt;188&lt;/TD&gt;&lt;TD&gt;5.12990&lt;/TD&gt;&lt;TD&gt;691&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-7.62763&lt;/TD&gt;&lt;TD&gt;211&lt;/TD&gt;&lt;TD&gt;5.12990&lt;/TD&gt;&lt;TD&gt;695&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-7.46829&lt;/TD&gt;&lt;TD&gt;570&lt;/TD&gt;&lt;TD&gt;5.12990&lt;/TD&gt;&lt;TD&gt;810&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-7.38851&lt;/TD&gt;&lt;TD&gt;367&lt;/TD&gt;&lt;TD&gt;6.26658&lt;/TD&gt;&lt;TD&gt;612&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-6.79448&lt;/TD&gt;&lt;TD&gt;588&lt;/TD&gt;&lt;TD&gt;7.25340&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;610&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to remove these all 10 observations from data set. Is there any handy code for outlier removal? Thank you.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Apr 2018 05:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453068#M69855</guid>
      <dc:creator>ramkhatiwada</dc:creator>
      <dc:date>2018-04-11T05:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Removing outliers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453102#M69858</link>
      <description>&lt;P&gt;There isn't a quick way, but you could save the output from the univariate, then use that to remove those values:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  delete from have
  where value_obs in (select value_obs from univariate_output);
quit;&lt;/PRE&gt;
&lt;P&gt;That would remove all values which have the number given in the univariate output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 08:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453102#M69858</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-11T08:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing outliers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453243#M69870</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/116201"&gt;@ramkhatiwada&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Using proc uni-variate procedure, I found that the following Obs are outliers:&lt;/P&gt;
&lt;P&gt;proc univariate;&lt;BR /&gt;var resids;&lt;BR /&gt;qqplot resids;&lt;BR /&gt;run;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;Extreme ObservationsLowest HighestValue Obs Value Obs
&lt;TABLE cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;-8.40972&lt;/TD&gt;
&lt;TD&gt;188&lt;/TD&gt;
&lt;TD&gt;5.12990&lt;/TD&gt;
&lt;TD&gt;691&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;-7.62763&lt;/TD&gt;
&lt;TD&gt;211&lt;/TD&gt;
&lt;TD&gt;5.12990&lt;/TD&gt;
&lt;TD&gt;695&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;-7.46829&lt;/TD&gt;
&lt;TD&gt;570&lt;/TD&gt;
&lt;TD&gt;5.12990&lt;/TD&gt;
&lt;TD&gt;810&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;-7.38851&lt;/TD&gt;
&lt;TD&gt;367&lt;/TD&gt;
&lt;TD&gt;6.26658&lt;/TD&gt;
&lt;TD&gt;612&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;-6.79448&lt;/TD&gt;
&lt;TD&gt;588&lt;/TD&gt;
&lt;TD&gt;7.25340&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;610&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to remove these all 10 observations from data set. Is there any handy code for outlier removal? Thank you.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you sure that you want to remove observations? Removing an observation removes all other variables as well.&amp;nbsp;Are other variables on those records still useful for other purposes? You might be better served by either adding a flag variable that indicates "do not use variable x when the flag value is 1 (or zero your choice)" by using where options. Or perhaps creating a new data set and setting these values to missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also Proc Univariate always by default shows the five largest and smallest values. They are not automatically "outliers". You may very well have values such as -6.79200 remaining in your data. Is that an outlier?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please run this example data and tell me if you actually think the five smallest and largest values are "outliers".&lt;/P&gt;
&lt;PRE&gt;data work.dummy;
   do x=1 to 10;
   y=1;
   output;
   end;
run;

proc univariate data=work.dummy;
   var y;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Apr 2018 14:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453243#M69870</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-11T14:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Removing outliers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453304#M69871</link>
      <description>&lt;P&gt;Yeah, that's not a good rule for identifying outliers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a different logic.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 17:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Removing-outliers/m-p/453304#M69871</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-11T17:22:38Z</dc:date>
    </item>
  </channel>
</rss>

