6.9 The negative binomial model

As said before, the negative binomial distribution (called also Pascal) could be an alternative if the overdispersion problem is present. This is because, this distribution allows to have different values for the mean and the variance. Formally, the probability mass function of this model is given by:

\[\begin{equation} Pr(x=k|r,p)=\begin{pmatrix}k+r-1\\r-1\end{pmatrix}p^r(1-p)^{k} \tag{6.78} \end{equation}\]

Where \(k\) is the number of failures until we hit the \(r^{th}\) success in a sequence of independent Bernoulli trials with probability of success equals to \(p\).

The name of negative binomial comes from the following:

\[\begin{equation*} \begin{pmatrix}k+r-1\\r-1\end{pmatrix}=(-1)^k\begin{pmatrix}-r\\k\end{pmatrix} \end{equation*}\]

Similar to binomial factor \(\begin{pmatrix}r\\k\end{pmatrix}\) but negative \(\begin{pmatrix}-r\\k\end{pmatrix}\)

The mean and the variance are:

\[\begin{equation*} \begin{cases} E(X)=\frac{r(1-p)}{p}\\ Var(X)=\frac{r(1-p)}{p^2} \end{cases} \end{equation*}\]

We can then derive the variance in terms of the mean as follows:

\[\begin{equation} Var(X)=E(X)+\frac{1}{r}E(X)^2 \tag{6.79} \end{equation}\]

The factor \(\frac{1}{r}\) is called the dispersion parameter, or clumping parameter.

The model that uses the formula (6.79) is called NB2, the 2 referring to the power of \(E(X)\) in the variance function. A second parameterization makes the variance linear in the mean instead:

\[\begin{equation*} Var(X)=E(X)+\alpha E(X) \end{equation*}\]

and is called NB1.

To allow the parameter \(r\) to have any real value, we can rewrite \(p\) and \(r\) in terms of \(E(X)\) and \(Var(X)\), and rewrite also the negative binomial factor using Gamma as follows:

\[\begin{equation} Pr(x=k)=\frac{\Gamma(r+k)}{k!\Gamma(r)}\Bigg(\frac{r}{r+E(X)}\Bigg)^r\Bigg(\frac{E(X)}{r+E(X)}\Bigg)^k \quad for \quad k=0,1,.. \tag{6.80} \end{equation}\]

The negative binomial model estimates the same regression equation (6.70) as the Poisson model, so the coefficients keep the same interpretation and are usually close in value, but they are not identical: the score equations differ because each observation is weighted by \(1/(1+\alpha\lambda_i)\). The main gain is on the standard errors, which the Poisson model understates badly under overdispersion.