<?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: Cumulative Distribution Function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449296#M113188</link>
    <description>&lt;P&gt;Check KS Test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc npar1way data=sashelp.class plots=edfplot edf ;
class sex;
var weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Mar 2018 12:31:49 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-03-28T12:31:49Z</dc:date>
    <item>
      <title>Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449161#M113187</link>
      <description>&lt;P&gt;Goodevening,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to obtain only one graph with the two cumulative distribution function in order to compare them.&amp;nbsp;&lt;BR /&gt;However, with this code, SAS generates 2 distinct graphs:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;proc univariate data=WORK.CDF;&lt;BR /&gt;var AGE HEIGHT;&lt;BR /&gt;cdfplot ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I need to change to have both curves on one single graph in order to compare them?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot in advance for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449161#M113187</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-03-27T21:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449296#M113188</link>
      <description>&lt;P&gt;Check KS Test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc npar1way data=sashelp.class plots=edfplot edf ;
class sex;
var weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 12:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449296#M113188</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-28T12:31:49Z</dc:date>
    </item>
    <item>
      <title>Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449300#M113189</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;First, thanks a lot for your answer. I tried to adapt your example to my case (WORK.QUERY_FOR_FINALDATABASE being my data file nd TRUEPERF and Performance_adj being the variables I want to display on the graph):&lt;BR /&gt;&lt;BR /&gt;proc npar1way data=WORK.QUERY_FOR_FINALDATABASE plots=edfplot edf ;&lt;BR /&gt;class TRUEPERF;&lt;BR /&gt;var Performance_adj ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Unfortunately, I obtain the following error: ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;BR /&gt;&lt;BR /&gt;Do you have any idea of where my mistake is located?&lt;BR /&gt;&lt;BR /&gt;thanks again! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Mar 2018 12:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449300#M113189</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-03-28T12:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449310#M113190</link>
      <description>&lt;P&gt;You must have a too big table to plot all these point in a graph. Try this one .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output EDFPlot=plot;
proc npar1way data=sashelp.class plots=edfplot edf ;
class sex;
var weight;
run;
ods select all;

proc sgplot data=plot;
step x=_x y=_edf/group=_class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 13:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449310#M113190</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-28T13:17:51Z</dc:date>
    </item>
    <item>
      <title>Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449316#M113191</link>
      <description>I tried your code but once again, I obtain the same error (my dataset is quite large, you're right):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;WARNING: You must enable ODS graphics before requesting plots.&lt;BR /&gt;ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;BR /&gt;&lt;BR /&gt;Do you have any other idea?&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Mar 2018 13:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449316#M113191</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-03-28T13:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449406#M113192</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/201052"&gt;@Max05&lt;/a&gt; wrote:&lt;BR /&gt;I tried your code but once again, I obtain the same error (my dataset is quite large, you're right):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;WARNING: You must enable ODS graphics before requesting plots.&lt;BR /&gt;ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;BR /&gt;&lt;BR /&gt;Do you have any other idea?&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;ODS graphics on;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc &amp;lt;any proc with plot statements&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to add ODS Graphics off;&lt;/P&gt;
&lt;P&gt;afterwards so that some procs such as Proc freq don't generate plots when not wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also use the ODS graphics statement to control things like the height and width of the plot area if it is too small by default.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 15:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449406#M113192</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-28T15:45:12Z</dc:date>
    </item>
    <item>
      <title>Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449412#M113193</link>
      <description>I am sorry. I adapted the code:&lt;BR /&gt;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;ods select none;&lt;BR /&gt;ods output EDFPlot=plot;&lt;BR /&gt;proc npar1way data=WORK.QUERY_FOR_FINALDATABASE plots=edfplot edf ;&lt;BR /&gt;class TRUEPERF;&lt;BR /&gt;var Performance_adj;&lt;BR /&gt;run;&lt;BR /&gt;ods select all;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=plot;&lt;BR /&gt;step x=_x y=_edf/group=_class;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;BR /&gt;&lt;BR /&gt;But once again, I obtain the same error... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449412#M113193</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-03-28T16:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449506#M113194</link>
      <description>&lt;P&gt;How many levels does your TRUEPERF variable have? and&amp;nbsp;Performance_adj?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try summarizing the data first and telling the procedure how many records are involved especially if you have lots of repear&lt;/P&gt;
&lt;PRE&gt;proc summary data=WORK.QUERY_FOR_FINALDATABASE  nway;
   class TRUEPERF Performance_adj;
   output out=work.summarized;
run;
/* which adds _freq_ with the count of combinations of the CLASS variables*/
proc npar1way data=WORK.summarized plots=edfplot edf ;
   class TRUEPERF;
   var Performance_adj;
   freq _freq_;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 21:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449506#M113194</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-28T21:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449628#M113195</link>
      <description>&lt;P&gt;Maybe you could manually calculate CDF and plot both in a graph .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="sas"&gt;&lt;SPAN&gt;data&lt;/SPAN&gt; &lt;SPAN&gt;Exp&lt;/SPAN&gt;;
&lt;SPAN&gt;set&lt;/SPAN&gt; A nobs=nobs;
v = &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_N_&lt;/SPAN&gt; - &lt;SPAN&gt;0.375&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; / &lt;SPAN&gt;(&lt;/SPAN&gt;nobs + &lt;SPAN&gt;0.25&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;; &lt;SPAN&gt;/* 2 */&lt;/SPAN&gt;
q = quantile&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Exponential"&lt;/SPAN&gt;, v, &lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;; &lt;SPAN&gt;/* 3 */&lt;/SPAN&gt;
&lt;SPAN&gt;run&lt;/SPAN&gt;;&lt;/PRE&gt;
&lt;P&gt;Here is&amp;nbsp; the blog about it written by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/28/modeling-the-distribution-of-data-create-a-qq-plot.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2011/10/28/modeling-the-distribution-of-data-create-a-qq-plot.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 12:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449628#M113195</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-29T12:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449653#M113196</link>
      <description>&lt;P&gt;See the article &lt;A href="https://blogs.sas.com/content/iml/2016/03/09/comparative-panel-overlay-histograms-sas.html" target="_self"&gt;"Comparative histograms in SAS"&lt;/A&gt;, which shows how to use the CLASS statement in PROC UNIVARIATE to overlay the plots. In this case, you want PROC UNIVARIATE to overlay the CDFPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The steps are:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Convert the data from wide to long.&lt;/P&gt;
&lt;P&gt;2. Use PROC UNIVARIATE and the OVERLAY option on the CDFPLOT statement to overlay the CDFPlots&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variables should be on the same (or similar scale).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
set Sashelp.Class;
length varName $20;
ObsNum = _N_;
varName = "Age";    Value = Age;    output; /* put VAR1 on this line */
varName = "Height"; Value = Height; output; /* put VAR2 on this line */
run;

proc univariate data=Have;
   class varName;
   var Value;
   cdfplot Value/ overlay;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 13:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/449653#M113196</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-03-29T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/450308#M113387</link>
      <description>&lt;P&gt;Thank you veru much for your helpful answers!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 08:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/450308#M113387</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-04-02T08:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Distribution Function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/451312#M113744</link>
      <description>&lt;P&gt;Goodevening,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have once again one problem with this procedure that I cannot solve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dataset is really simple and not big (2 columns and 100 lines) with this structure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ActualReturn&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BootstrapReturn&lt;/P&gt;&lt;P&gt;-2.18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2.08&lt;/P&gt;&lt;P&gt;-2.06&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2.01&lt;/P&gt;&lt;P&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can plot both on seperate graphs without any problems with the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title 'Cumulative Distribution Function of Breaking Strength';&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc univariate data=work.cdf noprint;&lt;BR /&gt;cdf ActualReturn BootstrapReturn / overlay;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I use the following code to plot both on the same one, nothing appears on the graph even though I have no error in my log.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other codes proposed do not work neither...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;proc summary data=WORK.cdf nway;&lt;BR /&gt;class ActualReturn BootstrapReturn;&lt;BR /&gt;output out=work.summarized;&lt;BR /&gt;run;&lt;BR /&gt;/* which adds _freq_ with the count of combinations of the CLASS variables*/&lt;BR /&gt;proc npar1way data=WORK.summarized plots=edfplot edf ;&lt;BR /&gt;class ActualReturn;&lt;BR /&gt;var BootstrapReturn;&lt;BR /&gt;freq _freq_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea of the reason which could explain that? Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cumulative-Distribution-Function/m-p/451312#M113744</guid>
      <dc:creator>Max05</dc:creator>
      <dc:date>2018-04-04T20:43:59Z</dc:date>
    </item>
  </channel>
</rss>

