No description provided.
BUG: fix precision issue with nbinom.pmf. Closes ticket 1779.
Thanks Ralf and bioinformed, Looks good to me
@pv a "special" question since you looked into similar issues recently
Do you know if it makes a difference for some relevant parameters?
betaln could replace 3 calls to gammaln, but I haven't seen any case yet in scipy.stats and in statsmodels where gammaln wasn't doing a good job
@josef-pkt: if you want the binomial coefficient, you can use scipy.special.binom (will be in Scipy 0.12.0).
betaln is implemented using gammaln
Thanks Pauli, then I'd rather stick with gammaln, or whichever is closer to the formulas in the references.
@josef-pkt: the gammaln formula gives wrong results if |n| >> |x| or |x| >> |n|. PR #370 fixes this in the beta function.
But this PR looks good to me, too.
Thanks for having a look. Merging.