<?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: Keep ONLY the highest-valued groups, for Box Plots in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106183#M258534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculating Q3 in a datastep is going to be a lot of work. Proc means / summary and merging with your existing data is probably a better bet. Why does it need to be in a datastep?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2012 17:50:14 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-12-21T17:50:14Z</dc:date>
    <item>
      <title>Keep ONLY the highest-valued groups, for Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106182#M258533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Presently I have so many "groups" when doing Box Plots that the result is SEVEN panels of box plots.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I'd like to have ONE panel, with about 20 box plots (or "groups").&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;So, that would require cutting out a bunch of groups.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Is there a way to automatically do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;What I have in mind is:&amp;nbsp; In a &lt;STRONG&gt;data step&lt;/STRONG&gt;, only keep the &lt;STRONG&gt;TOP 20 groups&lt;/STRONG&gt;, using Q3 value for each group as the criterion for keeping or removing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Any coding assistance greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Nicholas Kormanik&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 05:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106182#M258533</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2012-12-21T05:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Keep ONLY the highest-valued groups, for Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106183#M258534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculating Q3 in a datastep is going to be a lot of work. Proc means / summary and merging with your existing data is probably a better bet. Why does it need to be in a datastep?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 17:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106183#M258534</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-12-21T17:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Keep ONLY the highest-valued groups, for Box Plots</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106184#M258535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking that it could be easily done in the data step, is all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading up on the topic further, it now appears that perhaps the best answer is to do Proc BoxPlot with all groups, and include the option of creating OUTBOX or OUTHISTORY datafile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in a subsequent run, use one of these new datafiles as the new input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still not sure, though, of the exact coding for keeping the top 20 groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_boxplot_sect016.htm" title="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_boxplot_sect016.htm"&gt;SAS/STAT(R) 9.2 User's Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc boxplot history=Summary;&lt;/P&gt;&lt;P&gt;&amp;nbsp; plot (Weight Yieldstrength) * Batch;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since another datafile is being used in this subsequent run (history), and that datafile contains a column for, say, Q3, one would use a new data statement to tailor the history data file -- sort on the Q3 column, descending order, and use OBS=20, so that only the top 20 'groups' will be included, and then used.&amp;nbsp; Result should be ONE panel of box plots of the top 20 groups.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 23:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-ONLY-the-highest-valued-groups-for-Box-Plots/m-p/106184#M258535</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2012-12-21T23:01:57Z</dc:date>
    </item>
  </channel>
</rss>

