<?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 use proc means to get the standard statistics numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672036#M201895</link>
    <description>&lt;P&gt;Hi SAS community!&lt;/P&gt;
&lt;P&gt;Regarding getting some standard statistics number, I usually proc sort then using proc means to do so.&lt;/P&gt;
&lt;P&gt;My data is as below (I also attached a datafile contains one sample of my whole dataset). While Type indicates the companies, Country is 2-digit of country. My column of interest is amihud. The dataset included contains data from a lot of different countries. What I want is to receive some data statistics summary &lt;STRONG&gt;for each country&lt;/STRONG&gt; containing: median, mean, p1, p5, p90, p95, p99 &lt;STRONG&gt;of variable amihud&lt;/STRONG&gt; (especially it is good if the code relates to proc means)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance!&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Type	year	amihud	Country
772086	1989	.	AR
982616	1989	.	AR
982620	1989	.	AR
982629	1989	.	AR
982694	1989	.	AR
992128	1989	.	AR
992156	1989	.	AR
992183	1989	.	AR
992260	1989	.	AR
992280	1989	.	AR
772086	1990	.	AR
982616	1990	.	AR
982620	1990	.	AR
982629	1990	.	AR
982694	1990	.	AR
992128	1990	.	AR
992156	1990	.	AR
992183	1990	.	AR
992260	1990	.	AR
992280	1990	.	AR
772086	1991	.	AR&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;DIV id="eJOY__extension_root" class="eJOY__extension_root_class" style="all: unset;"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Fri, 24 Jul 2020 08:41:37 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2020-07-24T08:41:37Z</dc:date>
    <item>
      <title>How to use proc means to get the standard statistics numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672036#M201895</link>
      <description>&lt;P&gt;Hi SAS community!&lt;/P&gt;
&lt;P&gt;Regarding getting some standard statistics number, I usually proc sort then using proc means to do so.&lt;/P&gt;
&lt;P&gt;My data is as below (I also attached a datafile contains one sample of my whole dataset). While Type indicates the companies, Country is 2-digit of country. My column of interest is amihud. The dataset included contains data from a lot of different countries. What I want is to receive some data statistics summary &lt;STRONG&gt;for each country&lt;/STRONG&gt; containing: median, mean, p1, p5, p90, p95, p99 &lt;STRONG&gt;of variable amihud&lt;/STRONG&gt; (especially it is good if the code relates to proc means)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance!&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Type	year	amihud	Country
772086	1989	.	AR
982616	1989	.	AR
982620	1989	.	AR
982629	1989	.	AR
982694	1989	.	AR
992128	1989	.	AR
992156	1989	.	AR
992183	1989	.	AR
992260	1989	.	AR
992280	1989	.	AR
772086	1990	.	AR
982616	1990	.	AR
982620	1990	.	AR
982629	1990	.	AR
982694	1990	.	AR
992128	1990	.	AR
992156	1990	.	AR
992183	1990	.	AR
992260	1990	.	AR
992280	1990	.	AR
772086	1991	.	AR&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;DIV id="eJOY__extension_root" class="eJOY__extension_root_class" style="all: unset;"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jul 2020 08:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672036#M201895</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2020-07-24T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc means to get the standard statistics numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672044#M201898</link>
      <description>&lt;P&gt;You show an example where AMIHUD is always missing. I assume that's not always the case. So this ought to work (but I can't test it).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary nway data=have;
     class country;
     var amihud;
     output out=_stats_ mean=/autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 10:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672044#M201898</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-24T10:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc means to get the standard statistics numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672122#M201947</link>
      <description>&lt;P&gt;Where &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; has the Mean= you would place ALL of your desired statistics:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;median= mean=&amp;nbsp; p1= p5= p90= p95= p99= /autoname ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The autoname will append the statistic name to the variable so you can tell which stat is which in the data set.&lt;/P&gt;
&lt;P&gt;You may want the option NWAY on the proc statement or you will get a summary overall across all countries as well.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 15:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672122#M201947</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-24T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc means to get the standard statistics numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672124#M201948</link>
      <description>&lt;P&gt;Good catch,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 16:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-means-to-get-the-standard-statistics-numbers/m-p/672124#M201948</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-24T16:02:21Z</dc:date>
    </item>
  </channel>
</rss>

