[R] generating a gamma random variable
tlumley at u.washington.edu
Wed Oct 24 16:36:42 CEST 2001
On Wed, 24 Oct 2001, Aboubakar Maitournam wrote:
> There is a way to simulate a gamma law of parameters a and b, based on
> the standard method above (simplified) and the variation of the method
> of rejection.
And there are source code and references for how R does it, yet another
different way, in src/nmath/rgamma.c
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help