Closed Fuco1 closed 3 years ago
Thanks, I think you're right here. The documentation is copied from the distributions3 package, so the changes will also need to be applied there.
Could you briefly review the changes in #47 to check that it is now correct?
Thanks! I left you a review, there's just one typo I'm not sure about :+1:
Fixed, thanks for spotting this and for your review of the changes.
The
stats::*nbinom
functions are parametrized as follows (emph. mine)In this package, it is described as:
Both use
p
for the probability of success.I believe in your documentation
r
is thesize
parameter (it would be great if this was made explicit in the documentation).However looking at the source I see you are simply calling the
stats
functions which have the roles reversed.Now it might be very well possible I just don't get something, but it seems to me this will give "inverse" results? The formulas for mean/variance are also different.
Edit: indeed the variance and mean formulas are equivalent if we make a
p' = 1 - p
substitution. So something is definitely odd here.