How to run a negative binomial regression with GLM?

How to run a negative binomial regression with GLM?

You can also run a negative binomial model using the glm command with the log link and the binomial family. You will need to use the glm command to obtain the residuals to check other assumptions of the negative binomial model (see Cameron and Trivedi (1998) and Dupont (2002) for more information).

Which is the theta value in Stata negative binomial regression?

Thus, the theta value of 1.033 seen here is equivalent to the 0.968 value seen in the Stata Negative Binomial Data Analysis Example because 1/0.968 = 1.033. As we mentioned earlier, negative binomial models assume the conditional means are not equal to the conditional variances.

What is the p value of a negative binomial regression?

I’ll calculate the p-value for Eth as a demonstration: The variance of a negative binomial distribution is μ + μ 2 / θ, and theta accommodates the Poisson overdisperison. Dropping a predictor from the full model changes the MLE of theta.

How does dispersion parameter alpha affect negative binomial regression?

The coefficients have an additive effect in the log (y) scale and the IRR have a multiplicative effect in the y scale. The dispersion parameter alpha in negative binomial regression does not effect the expected counts, but it does effect the estimated variance of the expected counts.

How to estimate negative binomial regression in Stata?

Below we use the nbreg command to estimate a negative binomial regression model. The i. before prog indicates that it is a factor variable (i.e., categorical variable), and that it should be included in the model as a series of indicator variables. The output begins the iteration log.

How is the log of alpha calculated in Stata?

Stata finds the maximum likelihood estimate of the log of alpha and then calculates alpha from this. This means that alpha is always greater than zero and that Stata’s nbreg only allows for overdispersion (variance greater than the mean).