<?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: Incomplete gamma function in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/334966#M17669</link>
    <description>&lt;P&gt;Applied mathematicians&amp;nbsp;and physicists call the function an "incomplete gamma function," but a statistician calls it the CDF of the gamma distribution. &amp;nbsp;For the definition, see &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n0n7cce4a3gfqkn1vr0p1x0of99s.htm" target="_self"&gt;the doc for the CDF function&lt;/A&gt;. (For an explanation of the ideas, see &lt;A href="http://blogs.sas.com/content/iml/2013/11/13/how-to-compute-the-incomplete-beta-function-in-sas.html" target="_self"&gt;this article on the incomplete beta function.&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are asking for a plot of the empirical distribution of the data overlaid with a gamma CDF, you can use PROC UNIVARIATE:&lt;/P&gt;
&lt;P&gt;proc univariate data=have;&lt;/P&gt;
&lt;P&gt;var &amp;nbsp;x;&lt;/P&gt;
&lt;P&gt;cdfplot x / gamma;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have censored observations or&amp;nbsp;some other constraint, please provide an example of your data.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 14:32:19 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-02-22T14:32:19Z</dc:date>
    <item>
      <title>Incomplete gamma function</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/334943#M17668</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the incomplete gamma function for a sample size calculation regarding advanced survival analysis with correlated frailties. Do you have any hint, how I can calculate the incomplete gamma function in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 13:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/334943#M17668</guid>
      <dc:creator>Maya1</dc:creator>
      <dc:date>2017-02-22T13:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete gamma function</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/334966#M17669</link>
      <description>&lt;P&gt;Applied mathematicians&amp;nbsp;and physicists call the function an "incomplete gamma function," but a statistician calls it the CDF of the gamma distribution. &amp;nbsp;For the definition, see &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n0n7cce4a3gfqkn1vr0p1x0of99s.htm" target="_self"&gt;the doc for the CDF function&lt;/A&gt;. (For an explanation of the ideas, see &lt;A href="http://blogs.sas.com/content/iml/2013/11/13/how-to-compute-the-incomplete-beta-function-in-sas.html" target="_self"&gt;this article on the incomplete beta function.&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are asking for a plot of the empirical distribution of the data overlaid with a gamma CDF, you can use PROC UNIVARIATE:&lt;/P&gt;
&lt;P&gt;proc univariate data=have;&lt;/P&gt;
&lt;P&gt;var &amp;nbsp;x;&lt;/P&gt;
&lt;P&gt;cdfplot x / gamma;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have censored observations or&amp;nbsp;some other constraint, please provide an example of your data.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 14:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/334966#M17669</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-22T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete gamma function</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/335275#M17683</link>
      <description>&lt;P&gt;You can&amp;nbsp;just&amp;nbsp;use the product: cdf('gamma',x,alpha)*gamma(alpha),&lt;/P&gt;
&lt;P&gt;where alpha is the shape parameter and x is the value you want to evaluate the incomplete gammafunction in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That&amp;nbsp;product gives the same value as the integral that define the incomplete gammafunction:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  alpha=2;

  delta=2**(-20);
  integral=0;
  do t=delta to 3 by delta;
    integral+t**(alpha-1)*exp(-t)*delta;
  end;

  y=cdf('gamma',3,alpha)*gamma(alpha);
  put y=  / integral=;
ruN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 13:38:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Incomplete-gamma-function/m-p/335275#M17683</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2017-02-23T13:38:58Z</dc:date>
    </item>
  </channel>
</rss>

