<?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: Detect outliers and compare with aggregate data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Detect-outliers-and-compare-with-aggregate-data/m-p/886393#M350258</link>
    <description>Check &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; blogs:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/01/20/detecting-outliers-in-sas-part-1-estimating-location.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/01/20/detecting-outliers-in-sas-part-1-estimating-location.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/01/27/detecting-outliers-in-sas-part-2-estimating-scale.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/01/27/detecting-outliers-in-sas-part-2-estimating-scale.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/03/27/simulate-multivariate-outliers.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/03/27/simulate-multivariate-outliers.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/03/23/the-curse-of-dimensionality.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/03/23/the-curse-of-dimensionality.html&lt;/A&gt;</description>
    <pubDate>Wed, 26 Jul 2023 11:53:06 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-07-26T11:53:06Z</dc:date>
    <item>
      <title>Detect outliers and compare with aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detect-outliers-and-compare-with-aggregate-data/m-p/886330#M350243</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a data set that has&amp;nbsp;the following variables, shown in the sample below. I used univariate and other codes to work on this data.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data Exposure;
input Hospital $ Bug $ Drug $ Bug_Drug $ it_n ps_n ns_n;
datalines;
ABC Ecoli MC Ecoli_MC 122 0.5 61
ABC Ecoli MN Ecoli_MN 34 0.5 17
ABC Kleb MN Kleb_MN 200 0.9 180
ABC Kleb MC Kleb_MC 55 0.8 44
ABC Auris MN Auris_MN  143 0.01 1.43
ABC Auris MC Auris_MC  13 0.7 9.1
ABC Auris FL Auris_FL  500 0.7 350
ABC Ecoli FL Ecoli_FL 69 0.1 6.9
ABC Kleb FL Kleb_FL 113 0.4 45.2
XYZ Kleb MN Kleb_MN 100 0.6 60
XYZ Ecoli MC Ecoli_MC 233 1 233
XYZ Kleb MC Kleb_MC 33 1 33
XYZ Ecoli FL Ecoli_FL 112 1 112
XYZ Kleb FL Kleb_FL 100 0.8 80
XYZ Ecoli MN Ecoli_MN 212 1 212
XYZ Auris MN Auris_MN 78 0.9 70.2
XYZ Auris FL Auris_FL 23 1 23
RTY Kleb MN Kleb_Mn 50 0.6 30
RTY Ecoli MC Ecoli_MC 230 0.1 23
RTY Kleb MC Kleb_MC 440 0.8 352
RTY Kleb FL Kleb_FL 56 0.8 44.8
RTY Ecoli MN Ecoli_MN 20 0.9 18
RTY Ecoli FL Ecoli_FL 40 0.5 20
RTY Auris FL Auris_FL 29 0.8 23.2
RTY Auris MN Auris_MN 88 0.9 79.2
RTY Auris MC Auris_MC 90 0.1 9
HOW Kleb MN Kleb_Mn 50 0.4 20
HOW Ecoli MC Ecoli_MC 90 0.8 72
HOW Kleb MC Kleb_MC 66 0.1 6.6 
HOW Kleb FL Kleb_FL 70 0.1 7
HOW Ecoli MN Ecoli_MN 389 0.3 116.7
HOW Ecoli FL Ecoli_FL 120 0.7 84
HOW Auris FL Auris_FL 35 1 35
HOW Auris MN Auris_MN 99 0.2 19.8
HOW Auris MC Auris_MC 20 0.1 2
CVS Kleb MN Kleb_Mn 50 0.4 20
CVS Ecoli MC Ecoli_MC 312 0.4 124.8
CVS Kleb MC Kleb_MC 44 0.6 26.4 
CVS Kleb FL Kleb_FL 300 0.5 150
CVS Ecoli MN Ecoli_MN 60 0.4 24
CVS Ecoli FL Ecoli_FL 100 0.7 70
CVS Auris FL Auris_FL 78 0.1 7.8
CVS Auris MN Auris_MN 344 0.2 68.8
CVS Auris MC Auris_MC 789 0.6 473.4
;;;
run;
proc sort data= Exposure;
  by bug_drug;
run;
proc univariate data=Exposure;
  by bug_drug;
  var ps_n;
  histogram;
  output out=means mean=ps_mean std=ps_std; 
run;

data MDRO_Report_2021;
  merge Exposure means;
  by bug_drug;
run;

proc print data=MDRO_Report_2021;
  by bug_drug;
  sum it_n ps_n ns_n;
  var hospital drug bug bug_drug it_n ps_n ns_n;
run;

proc print data=MDRO_Report_2021 noobs;
  where abs(ps_n-ps_mean) &amp;gt; 1.5*ps_std ;
  by bug_drug;
  var hospital drug bug bug_drug it_n ps_n ns_n;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I need is to identify outliers (Hospital?) in the data and compare it to all other hospitals' data aggregate in terms of percent susceptibility (% ps_n).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is really appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 02:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detect-outliers-and-compare-with-aggregate-data/m-p/886330#M350243</guid>
      <dc:creator>mayasak</dc:creator>
      <dc:date>2023-07-26T02:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Detect outliers and compare with aggregate data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detect-outliers-and-compare-with-aggregate-data/m-p/886393#M350258</link>
      <description>Check &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; blogs:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/01/20/detecting-outliers-in-sas-part-1-estimating-location.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/01/20/detecting-outliers-in-sas-part-1-estimating-location.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/01/27/detecting-outliers-in-sas-part-2-estimating-scale.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/01/27/detecting-outliers-in-sas-part-2-estimating-scale.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/03/27/simulate-multivariate-outliers.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/03/27/simulate-multivariate-outliers.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/03/23/the-curse-of-dimensionality.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/03/23/the-curse-of-dimensionality.html&lt;/A&gt;</description>
      <pubDate>Wed, 26 Jul 2023 11:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detect-outliers-and-compare-with-aggregate-data/m-p/886393#M350258</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-07-26T11:53:06Z</dc:date>
    </item>
  </channel>
</rss>

