3
$\begingroup$

I'm working on a generalised linear regression model, using the so called NB2 model. In other words, I'm using a negative binomial regression model for count data. I would like to graph a normal probability plot in order to asses the goodness of fit of my model, using the Anscombe residuals.

However, unfortunately I was not able to find anything about those residuals on the Internet for the case of the negative binomial distribution. Any suggestions?

$\endgroup$
1
  • $\begingroup$ I know this is a late response, but I believe you will find the following paper useful: Best D, Rayner J, Thas O (2009) Anscombe’s Tests of Fit for the Negative Binomial Distribution. Journal of Statistical Theory and Practice doi: 10.1080/15598608.2009.10411946 $\endgroup$ – user97399 Dec 7 '15 at 20:01
1
$\begingroup$

Anscombe suggested two symmetrizing transforms for the negative binomial with mean $m$ and known exponent $k$* in his 1948 paper[1]:

  1. $\ln(y+\frac{k}{2})$; with variance approximately $\psi'(k)$. This transformation approximates the more accurate but more complicated one below -

  2. $2\sinh^{-1}\sqrt{\frac{y+c}{k-2c}}$, for $k>2$ where if $k$ is large $c\approx\frac{3}{8}$

    In this case variance is also approximately $\psi'(k)$. If $k$ is not small this is approximately $\frac{1}{k-\frac12}$, but the function $\psi'$ is often available (it is in R for example).

    Anscombe later suggests that a slightly smaller $c$ might be more suitable, and suggests rounding $c$ to a single decimal place; this would suggest $c=0.3$ might be a reasonable choice.

Note that the approximation in 1. is obtained by setting $c=k/2$ in 2., which is not generally very close to the optimum but may be more convenient.

* Specifically: $\Pr(Y = r) = \frac{\Gamma(r+k)}{r! \, \Gamma(k)} \left(\frac{m}{k+m}\right)^r \left(\frac{k}{k+m}\right)^k \quad\text{for }r = 0, 1, 2, \dotsc$

This is the same as the pmf listed in the Wikipedia article on the negative binomial under Alternative formulations at the fifth bullet point ("In negative binomial regression, ..."), but with the roles of $r$ and $k$ interchanged (so here $k$ is the shape parameter and the variance of this NB is $m+\frac{m^2}{k}$. (I've written it this way to fit with Anscombe's notation.)

Anscombe begins the paper with the transformation I list second, and initially gives it without the factor of 2 out the front (which only impacts the variance). He adds the factor of 2 later (presumably because it enables him to deal with both transformations together in several parts). Once standardized to a residual, the factor of 2 makes no difference, of course.

In each case, the usual Anscombe residual would be

$\qquad r^A_i=\frac{t(y_i)-t(\mu_i)}{\sqrt{\text{Var}(t(y_i))}}$

where $t$ is either the transformation in 1. or in 2., the Var term is replaced by its approximation above, and of course we would replace $\mu_i$ by its fitted value.

[1]: Anscombe, F. J. (1948),
"The Transformation of Poisson, Binomial and Negative-Binomial Data,"
Biometrika, Vol. 35, No. 3/4 (Dec.), pp. 246-254

$\endgroup$
2
  • $\begingroup$ I take it the idea here is that doing this will make the residuals sufficiently normal that a qq-plot becomes viable as a way to assess the validity of the NB model. Is that the gist of it? $\endgroup$ – gung - Reinstate Monica Jun 15 '16 at 2:20
  • $\begingroup$ @gung presumably, but I wouldn't put much weight on it if the mean is small or the $k$ parameter is small -- any more than I would in the case of Poisson regression with small mean, but perhaps even less so. In some situations it may help to indicate particular kinds of problems. $\endgroup$ – Glen_b Jun 15 '16 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.