[R] generating a gamma random variable

Thomas Lumley 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

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 mailing list