Re: [R] rgamma with rate as vector

From: Ben Bolker <>
Date: Tue, 18 Nov 2008 04:12:44 +0000 (UTC)

wcyee <wcyeee <at>> writes:


> How does the function rgamma work in the instance with the rate
> specified as a vector of values? My understanding is that rgamma
> returns m random values from the gamma distribution for a given shape,
> rate. But I don't understand what the resulting lambda1's mean with
> many rate values.

  If there are m rate values, then each of the m random deviates will be chosen with the corresponding rate parameter.

  Ben Bolker mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 18 Nov 2008 - 04:20:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Nov 2008 - 04:30:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive