In R there are several probability distributions that allow keywords for different parametrizations of the same distribution. For example, I use the Negative Binomial distribution a lot in my simulations of some biological processes and what particular case has me a little stumped.

I have some process that produces a vector with 950 Ints (no zeros) and I want to compare the actual distribution of the data with a theoretical NegBinom distribution. In R there is a parametrization that uses the mean, which I can calculate from my data, and the probability, which I can change to see how that affects the histogram. We don’t have access to that in Julia and while I’m sure there’s a way to get the parameter *r* from the mean, I haven’t been able to figure it out.

What would be the best strategy to allow different parametrizations in different distributions? What would it take to change Negative Binomial, as an example, and I can probably try and do it as an exercise? I don’t know if this has been discussed before or if there are already plans in this direction, if so, I’ll appreciate a link to the relevant discussion.