<?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 getting descriptive statistics with proc univariate for every deciles in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309895#M61260</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create&amp;nbsp;percentiles through Proc Univariate and I am using the below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=abdef;&lt;BR /&gt;var Total_AMT;&lt;BR /&gt;class process;&lt;BR /&gt;output out = data5 pctlpre=&lt;SPAN&gt;Total_AMT&lt;/SPAN&gt;_P_ pctlpts= 0.9 to 99.9 by 10 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am also trying to do is that I want to create some standard descriptive statistics at each decile like min, max, mean, std etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help as to how that can be created or will I have to use something else.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tej&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2016 22:49:42 GMT</pubDate>
    <dc:creator>BhararaTej</dc:creator>
    <dc:date>2016-11-07T22:49:42Z</dc:date>
    <item>
      <title>getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309895#M61260</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create&amp;nbsp;percentiles through Proc Univariate and I am using the below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=abdef;&lt;BR /&gt;var Total_AMT;&lt;BR /&gt;class process;&lt;BR /&gt;output out = data5 pctlpre=&lt;SPAN&gt;Total_AMT&lt;/SPAN&gt;_P_ pctlpts= 0.9 to 99.9 by 10 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am also trying to do is that I want to create some standard descriptive statistics at each decile like min, max, mean, std etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help as to how that can be created or will I have to use something else.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tej&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 22:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309895#M61260</guid>
      <dc:creator>BhararaTej</dc:creator>
      <dc:date>2016-11-07T22:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309897#M61261</link>
      <description>&lt;P&gt;You have to first calculate the decile to group your data before you can calculate the remaining statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 23:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309897#M61261</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-07T23:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309922#M61262</link>
      <description>&lt;P&gt;can you elaborate on what you mean by calculating deciles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought the deciles are getting calculated in my code when i use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pctlpre=Total_AMT_P_ &amp;nbsp;pctlpts= 0.9 to 99.9 by 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the deciles, just need now the statistics such as min, max, mean, std&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 02:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309922#M61262</guid>
      <dc:creator>BhararaTej</dc:creator>
      <dc:date>2016-11-08T02:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309923#M61263</link>
      <description>&lt;P&gt;Then run a proc means or univariate on your output data using the calculated decile from step 1 as your BY or CLASS variable to obtain the stats of interest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need the deciles before you can group the data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 03:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309923#M61263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-08T03:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309928#M61264</link>
      <description>&lt;P&gt;The code I mentioned above gives me the below table. It doesnt provides descriptive statistics at each decile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;for ex: min, max, mean, std for each of the 10 deciles below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have a code, kindly share.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Obs&lt;/TD&gt;&lt;TD&gt;Process&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_0_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_10_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_20_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_30_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_40_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_50_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_60_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_70_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_80_9&lt;/TD&gt;&lt;TD&gt;Total_Amt_P_90_9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;123.46&lt;/TD&gt;&lt;TD&gt;124.46&lt;/TD&gt;&lt;TD&gt;125.46&lt;/TD&gt;&lt;TD&gt;126.46&lt;/TD&gt;&lt;TD&gt;127.46&lt;/TD&gt;&lt;TD&gt;128.46&lt;/TD&gt;&lt;TD&gt;129.46&lt;/TD&gt;&lt;TD&gt;130.46&lt;/TD&gt;&lt;TD&gt;131.46&lt;/TD&gt;&lt;TD&gt;132.46&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;345.95&lt;/TD&gt;&lt;TD&gt;346.95&lt;/TD&gt;&lt;TD&gt;347.95&lt;/TD&gt;&lt;TD&gt;348.95&lt;/TD&gt;&lt;TD&gt;349.95&lt;/TD&gt;&lt;TD&gt;350.95&lt;/TD&gt;&lt;TD&gt;351.95&lt;/TD&gt;&lt;TD&gt;352.95&lt;/TD&gt;&lt;TD&gt;353.95&lt;/TD&gt;&lt;TD&gt;354.95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;4305.65&lt;/TD&gt;&lt;TD&gt;4306.65&lt;/TD&gt;&lt;TD&gt;4307.65&lt;/TD&gt;&lt;TD&gt;4308.65&lt;/TD&gt;&lt;TD&gt;4309.65&lt;/TD&gt;&lt;TD&gt;4310.65&lt;/TD&gt;&lt;TD&gt;4311.65&lt;/TD&gt;&lt;TD&gt;4312.65&lt;/TD&gt;&lt;TD&gt;4313.65&lt;/TD&gt;&lt;TD&gt;4314.65&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 08 Nov 2016 03:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309928#M61264</guid>
      <dc:creator>BhararaTej</dc:creator>
      <dc:date>2016-11-08T03:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309929#M61265</link>
      <description>&lt;P&gt;Oh...you first need to categorize each observation as being within a specific decile group so you can then calculate summary stats. Personally I prefer proc RANK for categorizing data. There isn't an option you can specify to get what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You were doing from 0.9 to 99.9 so were you trying to trim outliers? Unevenly isn't common....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 03:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309929#M61265</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-08T03:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309931#M61266</link>
      <description>&lt;P&gt;i am flexible on the deciles, I think at this point in time willing to work with the default deciles as well, but hoping to get the descriptive statistics at each decile in a format where the deciles goes horizontally over the top and the statistics goes vertically in the file (min, max, mean, std) for each decile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am guessing I will have to write some custom piece of code to write that. Will explore proc rank as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 03:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309931#M61266</guid>
      <dc:creator>BhararaTej</dc:creator>
      <dc:date>2016-11-08T03:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309935#M61267</link>
      <description>&lt;P&gt;Actually you may not need custom code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use proc RANK with 10 groups to get 10 deciles.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The use proc tabulate to generate your summaries - this generates a report, displayed output not a dataset. If you want a dataset use PROC means or univariate and then proc transpose. So semi custom if you need a dataset with the output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 03:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/309935#M61267</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-08T03:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: getting descriptive statistics with proc univariate for every deciles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/310698#M61299</link>
      <description>&lt;P&gt;Look at this example for how to use PROC RANK and PROC MEANS. It is not clear to me how you want to use the CLASS variable in your example, but this should get you started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=sashelp.cars out=cars groups=10 ;
var mpg_city;
ranks Rank;
run;

proc means data=cars;
class Rank Origin;
var mpg_highway weight length;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Nov 2016 15:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/getting-descriptive-statistics-with-proc-univariate-for-every/m-p/310698#M61299</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-11-10T15:55:35Z</dc:date>
    </item>
  </channel>
</rss>

