# What is theta in a negative binomial regression fitted with R?

I've got a question concerning a negative binomial regression: Suppose that you have the following commands:

require(MASS)
attach(cars)
mod.NB<-glm.nb(dist~speed)
summary(mod.NB)
detach(cars)


(Note that cars is a dataset which is available in R, and I don't really care if this model makes sense.)

What I'd like to know is: How can I interpret the variable theta (as returned at the bottom of a call to summary). Is this the shape parameter of the negbin distribution and is it possible to interpret it as a measure of skewness?

Yes, theta is the shape parameter of the negative binomial distribution, and no, you cannot really interpret it as a measure of skewness. More precisely:

• skewness will depend on the value of theta, but also on the mean
• there is no value of theta that will guarantee you lack of skew

If I did not mess it up, in the mu/theta parametrization used in negative binomial regression, the skewness is

$${\rm Skew}(NB) = \frac{\theta+2\mu}{\sqrt{\theta\mu(\theta+\mu)}} = \frac{1 + 2\frac{\mu}{\theta}}{\sqrt{\mu(1+\frac{\mu}{\theta})}}$$

In this context, $\theta$ is usually interpreted as a measure of overdispersion with respect to the Poisson distribution. The variance of the negative binomial is $\mu + \mu^2/\theta$, so $\theta$ really controls the excess variability compared to Poisson (which would be $\mu$), and not the skew.

• thanks so far! This is good help... But: How can I interpret high or (low) values of theta? In McCaullaughs book generalized linear models there is a link to this paper from anscombe to make an interpretation of k. But unfortunately I don't really get it. The paper is claremontmckenna.edu/facultysites/math/FacMember/MOneill/… – MarkDollar May 6 '11 at 21:20
• You just have to read the first page. So theta (or k in anscombe) is the shape parameter of the negbin distribution and it manages, if the distribution is closer to gamma (k -> 0) or poisson (k -> infinity). But what does it mean to the fit? How can I interpret theta for example for the cars estimation? – MarkDollar May 6 '11 at 21:28

I was referred to this site by one of my students in my Modeling Count Data course. There seems to be a lot of misinformation about the negative binomial model, and especially with respect to the dispersion statistic and dispersion parameter.

The dispersion statistic, which gives an indication of count model extra-dispersion, is the Pearson statistic divided by the residual DOF. $\mu$ is the location or shape parameter. For count models, the scale parameter is set at 1. The R glm and glm.nb $\theta$ is a dispersion parameter, or ancillary parameter. I called it the heterogeneity parameter in the first edition of my book, Negative Binomial Regression (2007, Cambridge University Press), but call it the dispersion parameter in my 2011 second edition. I give a complete rationale for the various terms in the NB model in my forthcoming book, Modeling Count Data (Cambridge) which is going to press today. It should be for sale (paperback) by July 15.

glm.nb and glm are unusual in how they define the dispersion parameter. The variance is given as $\mu+\frac{\mu^2}{\theta}$ rather than $\mu+\alpha\mu^2$, which is the direct parameterization. It is the way NB is modeled in SAS, Stata, Limdep, SPSS, Matlab, Genstat, Xplore, and most all software. When you compare glm.nb results with other software results, remember this. The author of glm (which came from S-plus) and glm.nb apparently took the indirect relationship from McCullagh & Nelder, but Nelder (who was the co-founder of GLM in 1972) wrote his kk system add-on to Genstat in 1993 in which he argued that the direct relationship is preferred. He and his wife used to visit me and my family about every other year in Arizona starting in early 1993 until the year before he died. We discussed this pretty thoroughly, since I had put a direct relationship into the glm program I wrote in late 1992 for Stata and Xplore software, and for a SAS macro in 1994.

The nbinomial function in the msme package on CRAN allows the user to employ the direct (default) or indirect (as an option, to duplicate glm.nb) parameterization, and provides the Pearson statistic and residuals to output. Output also displays the dispersion statistic, and allow the user to parameterize $\alpha$ (or $\theta$), giving parameter estimates for the dispersion. This allows you to assess which predictors add to the extra-dispersion of the model. This type of model is generally referred to as heterogeneous negative binomial. I'll put the nbinomial function into the COUNT package before the new book comes out, plus a number of new functions and scripts for graphics.

• Thanks for this clarification. I guess one problem for this misunderstandings comes from the R output of the sort where it reads "(Dispersion parameter for Negative Binomial(theta) family taken to be 1)". Here dispersion refers to the $\phi$ in $cov(\hat{\beta})=\phi(X^T\hat{Ŵ}X)^{-1}$, which you seem to call scale. So many people opt for calling the $\theta$ differently. Also derived from the R function, I tended to call $\mu$ location and $\theta$ "shape"-the latter of which I don't find unreasonable as it certainly influences the shape. – Momo Jun 16 '14 at 18:40
• What is the range of theta? Does theta have to be a value greater than one? – News_is_Selection_Bias Nov 25 at 23:28

glm reference negative binomial :

Wikipedia negative binomial 'r' is glm's 'theta' which implies glm 'theta' is shape parameter. In Simple terms, glm's 'theta' is number of failures.