In negative binomial regression, the MLE of the dispersion parameter is asymptotically uncorrelated with the MLEs of the regression coefficients (http://pointer.esalq.usp.br/departamentos/lce/arquivos/aulas/2011/LCE5868/OverdispersionBook.pdf).
The glm.nb function in the MASS package in R fits negative binomial regression, and gives standard errors for the dispersion parameter and a variance covariance matrix for the regression coefficients, but does not give an estimate of the covariance between these, presumably because of the aforementioned asymptotic zero correlation.
Other implementations of negative binomial regression, e.g. SAS's PROC GENMOD or Stata's nbreg, do report the covariance between the dispersion and regression coefficient estimates.
Moreover, a consequence of the approach taken by glm.nb is I think that the standard errors for the regression coefficients do not match those from SAS or Stata, because the former are calculated assuming independence between the regression coefficients and the dispersion parameter.
QUESTION: does anyone know of another negative binomial regression implementation in R that does allow for this correlation, and therefore gives standard errors that match those given by SAS or Stata?
Best Answer
I haven't found another R package which does this, but I have written code which, based on the maximum likelihood estimates of a model fitted with glm.nb, calculates the full variance covariance matrix using the observed information matrix.
Comparing to values from SAS this appears to match, but if anyone spots an error or finds that it does not match the variance covariance matrix from SAS or Stata, please add a comment to this answer.