None of this is necessary at all.
You don't need to have covariates to use -nbreg-.
Therefore, in principle the answer is just to
use -nbreg-, as you are fitting a distribution,
but without covariates.
In practice, there are various ways of parameterising
the negative binomial, and the parameterisation used
by -nbreg-, for good reasons, may differ from whatever
parameterisation you are accustomed to.
This problem is again no problem, as -nlcom- makes it
quite easy to map from one parameterisation to another.
Alternatively, for example, -nbfit- from SSC by Roberto
Gutierrez and myself is a worked example of code to use
one parameterisation common in ecology, with a worked
example in the help.
Nick
[email protected]
Radu Ban
> I have a variable and I would like to test whether its distribution
> can be assumed to be negative binomial.
>
> The one way I thought to do this, is to generate a true negative
> binomial distribution and to compare then the two distributions
> through a chi-squared test. However, I wasn't able to find a random
> number generator that gives a negative binomial distribution (the
> -rnd- that I found doesn't have this option). Does anyone have any
> suggestions?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/