Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From   "Tiago V. Pereira" <[email protected]>
To   [email protected]
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!

Regarding your advice, I fully agree: cumulative distribution function.

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
[email protected]


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tiago V.
Pereira
Sent: 30 November 2011 18:14
To: [email protected]
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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index