# How to find parameter $k$ from a negative binomial distribution in R?

I want to find the value of parameter $$k$$ from my data set. The data set is composed of several populations. Should I calculate the parameter $$k$$ for each subpopulation, or for the population at large?

I am trying to use the fitdist(data = x, distr = "nbinom", method = "mle") function, but I am not sure which term in this output would give the parameter $$k$$'s estimated value.

• What are you trying to do? Fit a distribution on all the data sets? Or fit one distribution to each data set? – user2974951 Oct 10 '18 at 6:23
• Fit a distribution on all data sets. So for every subpopulation I have a value k – PythonDabble Oct 10 '18 at 15:33
• I think we need more information about what you are trying to do and why. – user2974951 Oct 11 '18 at 11:04