<?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 find groups with 10 highest mean values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809892#M33800</link>
    <description>&lt;P&gt;PROC SUMMARY is 99% the same as PROC MEANS. The default outputs are different, SUMMARY defaults to output to a SAS data set, MEAN defaults to output as text in HTML or LISTING.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 16:34:30 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-26T16:34:30Z</dc:date>
    <item>
      <title>What seems simple is complicated.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809879#M33797</link>
      <description>&lt;P&gt;I have an order transactions data set with one million records.&amp;nbsp; Among the list of order records and variables, there is a GROUP variable which is a classifier and an ITEMS variable which is a numerical integer.&amp;nbsp; My goal is to make a table that displays the top 10 GROUPs with the highest &lt;EM&gt;mean&lt;/EM&gt; ITEMS.&amp;nbsp; I will try to give you an example data set:&lt;/P&gt;&lt;P&gt;order_id, group_id, items;&lt;/P&gt;&lt;P&gt;1, A, 6;&lt;/P&gt;&lt;P&gt;2, D, 12;&lt;/P&gt;&lt;P&gt;3, B, 15;&lt;/P&gt;&lt;P&gt;4, A, 10;&lt;/P&gt;&lt;P&gt;5, C, 2;&lt;/P&gt;&lt;P&gt;6, B, 14;&lt;/P&gt;&lt;P&gt;7, F, 4;&lt;/P&gt;&lt;P&gt;8, B, 9;&lt;/P&gt;&lt;P&gt;9, A, 24;&lt;/P&gt;&lt;P&gt;10, D, 12;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine I need to use a combination of PROC MEANS, PROC SORT, and PROC PRINT, but I have tried these in combinations with no success.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 14:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809879#M33797</guid>
      <dc:creator>tmccombs27</dc:creator>
      <dc:date>2022-04-26T14:10:50Z</dc:date>
    </item>
    <item>
      <title>How to find groups with 10 highest mean values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809880#M33798</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
    class group_id;
    var items;
    output out=_means_ mean=;
run;
proc sort data=_means_ out=want;
    by descending items;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This doesn't give the TOP N means, it gives you all means in descending order; but you can get the TOP N means easily from data set WANT in a DATA step.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 16:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809880#M33798</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-26T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: What seems simple is complicated.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809886#M33799</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;I applied this to my data set and I have what I wanted.&amp;nbsp; I used &lt;EM&gt;proc print&lt;/EM&gt; to get my top 10 for display.&amp;nbsp; I have not used &lt;EM&gt;proc summary&lt;/EM&gt; before, and I kept trying to use &lt;EM&gt;by&lt;/EM&gt; where I should have used &lt;EM&gt;class.&amp;nbsp;&amp;nbsp;&lt;/EM&gt;I also would have never guessed that I could define a statistic within the &lt;EM&gt;OUT&lt;/EM&gt; statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 15:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809886#M33799</guid>
      <dc:creator>tmccombs27</dc:creator>
      <dc:date>2022-04-26T15:14:25Z</dc:date>
    </item>
    <item>
      <title>How to find groups with 10 highest mean values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809892#M33800</link>
      <description>&lt;P&gt;PROC SUMMARY is 99% the same as PROC MEANS. The default outputs are different, SUMMARY defaults to output to a SAS data set, MEAN defaults to output as text in HTML or LISTING.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 16:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-seems-simple-is-complicated/m-p/809892#M33800</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-26T16:34:30Z</dc:date>
    </item>
  </channel>
</rss>

