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 generate a random variable with PDF gamma(a,b,g,x)


From   "Tiago V. Pereira" <[email protected]>
To   [email protected]
Subject   st: How to generate a random variable with PDF gamma(a,b,g,x)
Date   Mon, 13 Jun 2011 16:04:19 -0300 (BRT)

Dear Statalisters,

I would like to generate a gamma random variable with probability density
function given by gamma(a,b,g,x) where a = 3 (shape), b = 0.04 (scale), g
= 0.80 (location).

I believe that the trick is to generate x correctly from a uniform
distribution, since I am looking at x>g only.

The pdf should look like this:

http://tinypic.com/r/5yrxgg/7

Any suggestions?

All the best,

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