[R] rgamma with rate as vector
Ben Bolker
bolker at ufl.edu
Tue Nov 18 05:12:44 CET 2008
wcyee <wcyeee <at> gmail.com> writes:
>
[snip]
>
> 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
More information about the R-help
mailing list