<?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: Put the leverage and outlier observations in a separate dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Put-the-leverage-and-outlier-observations-in-a-separate-dataset/m-p/717348#M34688</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60061"&gt;@fatemeh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your recent thread&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Detect-extreme-values-through-leverage-and-outlier-changing/m-p/717322#M34686" target="_self"&gt;Detect extreme values through leverage and outlier changing cutoff value based on 90 percentiles&lt;/A&gt;&amp;nbsp;you were recommended to read&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;'s&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;blog post&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html" target="_self"&gt;Detecting outliers in SAS: Part 3: Multivariate location and scatter&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take another look at the post.&amp;nbsp; It has an example that does bulk of what you request.&amp;nbsp; The statement&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   ods output diagnostics=Diagnostics(where=(leverage=1));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;produced a data set named &lt;EM&gt;&lt;STRONG&gt;diagnostics&lt;/STRONG&gt;&lt;/EM&gt; with 4 observations at leverage=1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead you could drop the "where=(leverage=1)" options, which would produce as many obs in &lt;EM&gt;&lt;STRONG&gt;diagnostics&lt;/STRONG&gt;&lt;/EM&gt; as in your original data, and in the same order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could then do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   merge your_original_dataset diagnostics;
   if leverage=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you could use whatever minimum leverage values you prefer.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Feb 2021 04:25:08 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-02-07T04:25:08Z</dc:date>
    <item>
      <title>Put the leverage and outlier observations in a separate dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Put-the-leverage-and-outlier-observations-in-a-separate-dataset/m-p/717324#M34687</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to put the leverage and outlier observations that are detected via robust regression, in a separate dataset.&amp;nbsp;Any help will be appreciated to solve my problem.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Feb 2021 19:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Put-the-leverage-and-outlier-observations-in-a-separate-dataset/m-p/717324#M34687</guid>
      <dc:creator>fatemeh</dc:creator>
      <dc:date>2021-02-06T19:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Put the leverage and outlier observations in a separate dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Put-the-leverage-and-outlier-observations-in-a-separate-dataset/m-p/717348#M34688</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60061"&gt;@fatemeh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your recent thread&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Detect-extreme-values-through-leverage-and-outlier-changing/m-p/717322#M34686" target="_self"&gt;Detect extreme values through leverage and outlier changing cutoff value based on 90 percentiles&lt;/A&gt;&amp;nbsp;you were recommended to read&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;'s&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;blog post&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://blogs.sas.com/content/iml/2012/02/02/detecting-outliers-in-sas-part-3-multivariate-location-and-scatter.html" target="_self"&gt;Detecting outliers in SAS: Part 3: Multivariate location and scatter&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take another look at the post.&amp;nbsp; It has an example that does bulk of what you request.&amp;nbsp; The statement&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   ods output diagnostics=Diagnostics(where=(leverage=1));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;produced a data set named &lt;EM&gt;&lt;STRONG&gt;diagnostics&lt;/STRONG&gt;&lt;/EM&gt; with 4 observations at leverage=1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead you could drop the "where=(leverage=1)" options, which would produce as many obs in &lt;EM&gt;&lt;STRONG&gt;diagnostics&lt;/STRONG&gt;&lt;/EM&gt; as in your original data, and in the same order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could then do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   merge your_original_dataset diagnostics;
   if leverage=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you could use whatever minimum leverage values you prefer.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 04:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Put-the-leverage-and-outlier-observations-in-a-separate-dataset/m-p/717348#M34688</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-02-07T04:25:08Z</dc:date>
    </item>
  </channel>
</rss>

