<?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: Sorting Summary Statistics by Mean in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781918#M31849</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select Make,count(Horsepower) as n label='Nobs',
       mean(Horsepower) as mean label='Mean',
    std(Horsepower) as std label='Stddev'
 from sashelp.cars
  group by Make
   order by mean desc;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 Nov 2021 12:09:22 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-11-23T12:09:22Z</dc:date>
    <item>
      <title>Sorting Summary Statistics by Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781825#M31833</link>
      <description>&lt;P&gt;I am working with the default CARS data set in SAS Studio, and want to examine the difference in mean horsepower between car manufacturers. The image/code below is my simple Summary Statistics program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://prnt.sc/20kfe5g" target="_blank" rel="noopener"&gt;https://prnt.sc/20kfe5g&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;ods noproctitle;
ods graphics / imagemap=on;

proc means data=SASHELP.CARS chartype mean std vardef=df;
	var Horsepower;
	class Make;
run;&lt;/PRE&gt;&lt;P&gt;As you can see, the output is organized by make. This would be fine if I were only interested in a single make, but the large number of manufacturers makes it difficult to examine the order of all at once. I need to sort the output table by Mean. How do I do it?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 01:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781825#M31833</guid>
      <dc:creator>brush01</dc:creator>
      <dc:date>2021-11-23T01:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Summary Statistics by Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781850#M31835</link>
      <description>&lt;P&gt;You cannot control the displayed output at that level unfortunately.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can save the output to a data set (click on the OUTPUT tab and check the box and select the stats).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can sort/re-order the output data set as desired.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/403431"&gt;@brush01&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am working with the default CARS data set in SAS Studio, and want to examine the difference in mean horsepower between car manufacturers. The image/code below is my simple Summary Statistics program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://prnt.sc/20kfe5g" target="_blank" rel="noopener"&gt;https://prnt.sc/20kfe5g&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;ods noproctitle;
ods graphics / imagemap=on;

proc means data=SASHELP.CARS chartype mean std vardef=df;
	var Horsepower;
	class Make;
run;&lt;/PRE&gt;
&lt;P&gt;As you can see, the output is organized by make. This would be fine if I were only interested in a single make, but the large number of manufacturers makes it difficult to examine the order of all at once. I need to sort the output table by Mean. How do I do it?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 03:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781850#M31835</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-23T03:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Summary Statistics by Mean</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781918#M31849</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select Make,count(Horsepower) as n label='Nobs',
       mean(Horsepower) as mean label='Mean',
    std(Horsepower) as std label='Stddev'
 from sashelp.cars
  group by Make
   order by mean desc;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Nov 2021 12:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Sorting-Summary-Statistics-by-Mean/m-p/781918#M31849</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-23T12:09:22Z</dc:date>
    </item>
  </channel>
</rss>

