I have a dataset of counts on which I tried to fit a Poisson distribution, but my variance is larger than the average so I decided to use a negative binomial distribution.
to estimate r and p based on the mean and variance of my dataset. However, the nbinom.pmf
function requires n and p as parameters. How can I estimate n based on r? The plot is not right if I use r as n.
Best Answer