Hi, When using any of the distributions of scipy.stats there does not seem to be the ability (or at least I cannot figure out how) to have the function return the log of the pdf, cdf, sf, etc. For statistical analysis this is essential. For instance suppose we are interested in an exponential distribution for a random variable x with a hyperparameter lambda there needs to be an option that returns -log(lambda)-x/lambda. It is not sufficient (numerically) to calculate log(scipy.stats.expon.pdf(x,lambda)). Is there a way to do this using the distributions in scipy.stats? If there is not is it possible for me to suggest that this feature is added. There is such an excellent range of distributions, each with such an impressive range of options, it seems ashame to have to mostly manually code up the log of pdfs and often call the log of CDFs from R. Thanks, Chris.
I posted this over a week ago and we have a running thread with discussion on it. So ignore this somewhat mysterious re-appearance of an old post. If you are interested in the discussion post in the other thread. On Thu, May 27, 2010 at 9:22 PM, Chris Strickland < christopher.strickland@qut.edu.au> wrote:
Hi,
When using any of the distributions of scipy.stats there does not seem to be the ability (or at least I cannot figure out how) to have the function return the log of the pdf, cdf, sf, etc. For statistical analysis this is essential. For instance suppose we are interested in an exponential distribution for a random variable x with a hyperparameter lambda there needs to be an option that returns -log(lambda)-x/lambda. It is not sufficient (numerically) to calculate log(scipy.stats.expon.pdf(x,lambda)).
Is there a way to do this using the distributions in scipy.stats?
If there is not is it possible for me to suggest that this feature is added. There is such an excellent range of distributions, each with such an impressive range of options, it seems ashame to have to mostly manually code up the log of pdfs and often call the log of CDFs from R.
Thanks, Chris. _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
participants (2)
-
Chris Strickland -
Chris Strickland