> When you say "not robust to large values," do you mean large values of the count, large values of alpha and/or beta, or both?
All three. Formally problems arise in the current implementation
of the incomplete beta function when alpha is big and/or
when z is close to 1. Translating to the neg_binomial_2
parameterization this means large alpha, large beta, and/or
large counts.
> Over what range is the current implementation stable (prior to your fix)?
It’s not trivial to specify a stable region in the current implementations
as the convergence of the underlying power series depends on the
interactions of all of the parameters. Problems can arise in alpha
values as low as 100 if z is sufficiently close to 1 (say z > 0.99) and
it might be even worse.
The fix was checked on a bunch of values pushing into the millions
for z close to zero and one and seemed to be sufficiently accurate
everywhere.