 Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: How to compute the CDF of a gamma distribution in Stata

 From "Tiago V. Pereira" To statalist@hsphsun2.harvard.edu Subject st: How to compute the CDF of a gamma distribution in Stata Date Thu, 1 Dec 2011 14:23:40 -0200 (BRST)

```Again, many thanks, Nick! It worked as a charm!

All the best,

Tiago

The cumulative _distribution_ function of a two-parameter gamma
distribution is given by gammap(shape, y/scale) or gammap(shape, scale*y)
depending on whether the scale parameter has the same units as the
variable or their reciprocal. (Both parameterisations are common, the
latter because of the interpretation it allows as a rate.)

This applies also to your example with zero location.

I'd advise against the term cumulative density function.

Nick
n.j.cox@durham.ac.uk

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Tiago V.
Pereira
Sent: 30 November 2011 18:14
To: statalist@hsphsun2.harvard.edu
Subject: st: How to compute the CDF of a gamma distribution in Stata

Dear statalisters,

Is there a quick way to compute in Stata the cumulative density of a gamma
distribution with parameters a,b and g, where a = shape, b = scale and g =
location?

For example for a = 1, b=1 and g = 0, I would like to compute the P[x<=2].

Cheers!

Tiago
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```