<?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 How to select the top and bottom 100 observations for 5 variables each in a dataset? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156904#M41137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched around online for answers on the fastest way, in a database of around a million rows, to select the top and bottom observarions each for a selected few variables. It could either be the top/bottom 100 obs, or selected based on some criteria (for example; select all observations above/below a certain value, or above/below 1 standard deviation from the mean etc.). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To clarify, I want to create a new dataset for each of the variables I want the tob/bottom values from . Does anyone have some code-examples to share?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Hank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2014 12:34:22 GMT</pubDate>
    <dc:creator>Hank</dc:creator>
    <dc:date>2014-01-30T12:34:22Z</dc:date>
    <item>
      <title>How to select the top and bottom 100 observations for 5 variables each in a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156904#M41137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched around online for answers on the fastest way, in a database of around a million rows, to select the top and bottom observarions each for a selected few variables. It could either be the top/bottom 100 obs, or selected based on some criteria (for example; select all observations above/below a certain value, or above/below 1 standard deviation from the mean etc.). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To clarify, I want to create a new dataset for each of the variables I want the tob/bottom values from . Does anyone have some code-examples to share?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Hank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 12:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156904#M41137</guid>
      <dc:creator>Hank</dc:creator>
      <dc:date>2014-01-30T12:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to select the top and bottom 100 observations for 5 variables each in a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156905#M41138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC RANK?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:06:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156905#M41138</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-01-30T13:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to select the top and bottom 100 observations for 5 variables each in a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156906#M41139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC SURVEYSELECT?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 14:38:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156906#M41139</guid>
      <dc:creator>gnanau</dc:creator>
      <dc:date>2014-01-30T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to select the top and bottom 100 observations for 5 variables each in a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156907#M41140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried it and maybe my coding is poor, but it only gives you the ranking of the variables. To proceed, I would then have to select the top and bottom of the ranks which in my dataset adds no value. Not familiar with proc surveyselect, but will check it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 13:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156907#M41140</guid>
      <dc:creator>Hank</dc:creator>
      <dc:date>2014-02-09T13:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to select the top and bottom 100 observations for 5 variables each in a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156908#M41141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see how SURVEYSELECT will help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you define top and bottom.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;order by var; 100 from the top 100 from end (could be less than 100 values if there are ties)&lt;/LI&gt;&lt;LI&gt;rank by var; and take top 100 ranks and bottom 100 ranks.&amp;nbsp; (could be more obs if there are ties)&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2014 13:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-select-the-top-and-bottom-100-observations-for-5/m-p/156908#M41141</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-02-09T13:24:44Z</dc:date>
    </item>
  </channel>
</rss>

