<?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 Identify outliers in multple clusters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-outliers-in-multple-clusters/m-p/770770#M244511</link>
    <description>&lt;P&gt;I have 12 different groups and i need to apply the LB and UB IQR to each one individually.&lt;/P&gt;&lt;P&gt;I used proc univariate to get the stats and than calculated each IQR.&amp;nbsp; I am trying to figure out how to apply the correct IQR to the datasets to flag the outliers .&lt;/P&gt;&lt;P&gt;here is some of my code.&amp;nbsp; I haven't started coding the next step because i really have no idea.&amp;nbsp; I was thinking do loops and macros.&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;means&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=test5 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p99&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;n&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;skewness&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;qrange&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rate_amt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=prox_rate(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=_type_) &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;min&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;min&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;qrange&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; zone nems lowincome rate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; prox_rate2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; prox_rate;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;lb=p25-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;*IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;UB=P75+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;+IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I HAVE ATTACHED A SAMPLE DATA SET&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 00:34:55 GMT</pubDate>
    <dc:creator>bibbnd</dc:creator>
    <dc:date>2021-09-28T00:34:55Z</dc:date>
    <item>
      <title>Identify outliers in multple clusters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-outliers-in-multple-clusters/m-p/770770#M244511</link>
      <description>&lt;P&gt;I have 12 different groups and i need to apply the LB and UB IQR to each one individually.&lt;/P&gt;&lt;P&gt;I used proc univariate to get the stats and than calculated each IQR.&amp;nbsp; I am trying to figure out how to apply the correct IQR to the datasets to flag the outliers .&lt;/P&gt;&lt;P&gt;here is some of my code.&amp;nbsp; I haven't started coding the next step because i really have no idea.&amp;nbsp; I was thinking do loops and macros.&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;means&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=test5 &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p99&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;n&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;skewness&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;qrange&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rate_amt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=prox_rate(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=_type_) &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mean&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;median&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;mode&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;min&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;min&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p25&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;p75&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;max&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;qrange&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; zone nems lowincome rate; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; prox_rate2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; prox_rate;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;lb=p25-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;*IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;UB=P75+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;+IQR;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I HAVE ATTACHED A SAMPLE DATA SET&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 00:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-outliers-in-multple-clusters/m-p/770770#M244511</guid>
      <dc:creator>bibbnd</dc:creator>
      <dc:date>2021-09-28T00:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Identify outliers in multple clusters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-outliers-in-multple-clusters/m-p/770815#M244520</link>
      <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apply bounds to what? Where?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 07:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-outliers-in-multple-clusters/m-p/770815#M244520</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-28T07:40:19Z</dc:date>
    </item>
  </channel>
</rss>

