Re: [S] bug in the rate parameter for gamma dist.?

eric.gibson@pharma.novartis.com
Thu, 4 Jun 1998 14:20:01 -0400


The "rate" parameter in the gamma distribution
(also called the scale parameter) is always set to 1 in the rgamma function
because if you want to generate from a gamma with a rate (ie scale)
parameter different from one
you simply multiply the random variates by the appropriate scaling term.
So the rate parameter (ie scale parameter) is really surperfluous to the
rgamma function.
Hope this helps.

Kind regards,
Eric Gibson
Novartis Pharmaceuticals

jones@reed.edu (Albyn Jones) on 06/04/98 12:46:34 PM

Please respond to jones@reed.edu

To: leslie@constat.dk
cc: s-news@wubios.wustl.edu (bcc: Eric Gibson/PH/Novartis)
Subject: Re: [S] bug in the rate parameter for gamma dist.?

>The rate parameter of a gamma distribution should (as far as I know) be
>positive, but it is possible to set the rate in the rgamma, qgamma etc.
>functions to a negative value. This gives negative values from for example
>rgamma
>
>ex.:
> > rgamma(3,1,-1)
>[1] -3.2084157638 -0.5094224287 -0.7898035442
>

which version of S+ are you using? In 3.4 on a Sun I get

> rgamma(3,1,-1)
Error: Too many arguments to rgamma; last 1 not matched

albyn
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news