<?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 Highlighting outliers in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Highlighting-outliers/m-p/378900#M24660</link>
    <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I notice in my dataset that there appears to be a few outliers which in turn can throw out headline figures. They appear to be related to keying errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is include in my datastep an if statment that will mark an outlier with a Y if it 3 times higher than the average level of turnover in that sector.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be something simple like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data i;
set m;
if NET_OPERATING_INCOME_1*(3)&amp;gt;mean_operating_income then outlier='Y';run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, what this does is actually just multiply the variable net_operating_income *3 whereas I just want SAS to mark the observation with a Y anytime a value in net_operating_income_1 is 3 times larger then mean_operating_income.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any input would be most welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KInd regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 08:36:52 GMT</pubDate>
    <dc:creator>Sean_OConnor</dc:creator>
    <dc:date>2017-07-25T08:36:52Z</dc:date>
    <item>
      <title>Highlighting outliers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Highlighting-outliers/m-p/378900#M24660</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I notice in my dataset that there appears to be a few outliers which in turn can throw out headline figures. They appear to be related to keying errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is include in my datastep an if statment that will mark an outlier with a Y if it 3 times higher than the average level of turnover in that sector.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be something simple like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data i;
set m;
if NET_OPERATING_INCOME_1*(3)&amp;gt;mean_operating_income then outlier='Y';run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, what this does is actually just multiply the variable net_operating_income *3 whereas I just want SAS to mark the observation with a Y anytime a value in net_operating_income_1 is 3 times larger then mean_operating_income.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any input would be most welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KInd regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 08:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Highlighting-outliers/m-p/378900#M24660</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2017-07-25T08:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Highlighting outliers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Highlighting-outliers/m-p/378902#M24661</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; i&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;  set&lt;/SPAN&gt; m&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;  outlier=ifc(net_operating_income_1 &amp;gt; (&lt;/SPAN&gt;mean_operating_income * 3),&lt;SPAN class="token string"&gt;'Y','N')&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You were nearly there - note I use the ifc function rather than if construct for brevity.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 08:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Highlighting-outliers/m-p/378902#M24661</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-25T08:47:29Z</dc:date>
    </item>
  </channel>
</rss>

