[SciPy-user] accuracy of stats.gamma.pdf
Pauli Virtanen
pav at iki.fi
Thu Jan 29 07:52:37 EST 2009
Thu, 29 Jan 2009 10:48:01 +0100, Nicolas Chopin wrote:
> Dear list,
> when I compute:
>
> stats.gamma.pdf(5.,2.,5.)
>
> I get:
> array([0.])
>
> whereas the same command in R outputs:
> > dgamma(5.,2.,5.)
> [1] 1.735993e-09
Reading help(dgamma) in R, and help(scipy.stats.gamma.pdf) reveals the
following:
In R, the third parameter to dgamma is the rate parameter. In Scipy, the
third parameter is the location parameter, ie.
scipy.stats.gamma.pdf(x, a, mu) == dgamma(x - mu, a)
It appears that scipy.stats.gamma doesn't have a scale parameter.
--
Pauli Virtanen
More information about the SciPy-User
mailing list