<?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 get the accumulative quantiles in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644437#M192478</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set and I want to get the accumulative 25%,75%, 50% quantiles for several variables. That is, for every row, I want to get the quantiles for the&amp;nbsp;column including all the data before that row. Anyone knows how to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 May 2020 02:17:26 GMT</pubDate>
    <dc:creator>bayoote</dc:creator>
    <dc:date>2020-05-01T02:17:26Z</dc:date>
    <item>
      <title>How to get the accumulative quantiles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644437#M192478</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set and I want to get the accumulative 25%,75%, 50% quantiles for several variables. That is, for every row, I want to get the quantiles for the&amp;nbsp;column including all the data before that row. Anyone knows how to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 02:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644437#M192478</guid>
      <dc:creator>bayoote</dc:creator>
      <dc:date>2020-05-01T02:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the accumulative quantiles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644459#M192488</link>
      <description>&lt;P&gt;You will likely get a better answer if you provide some example data and what the results for that data would be.&lt;/P&gt;
&lt;P&gt;Since quantiles are order statistics there are likely to be some questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am guessing at this point as to what you mean/ want. Do you have access to SAS/IML? I have a sneaking suspicion that might be needed or the easiest. If you don't know if you have SAS/IML you can try running this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc product_status;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;The log will show SAS modules you currently have installed.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 06:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644459#M192488</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-01T06:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the accumulative quantiles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644492#M192502</link>
      <description>&lt;P&gt;How many rows does the data have ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Up to a certain point, one simple approach is to combine N groups of sizes 1 to N over the data and process the combined data using PROC MEANS with a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example - 100 rows, creates a 'triangle' of grouped data with 5,050 rows ( N (N+1) / 2 )&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
  call streaminit(123);
  do row = 1 to 100;
    x = ceil(500*rand('normal', 10, 4));
    output;
  end;
run;

data triangle;
  set have nobs=nobs;
  do group = _n_ to nobs;
    output;
  end;
run;

proc sort data=triangle;
  by group;
run;

proc means noprint data=triangle;
  by group;
  var x;
  output out=accum_quartiles q1=q1 p50=p50 q3=q3;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 May 2020 11:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-accumulative-quantiles/m-p/644492#M192502</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-05-01T11:08:10Z</dc:date>
    </item>
  </channel>
</rss>

