Parametric modelling of variance of count data I am looking to model some data, but I am not sure what type of model I can use.  I have count data, and I want a model that will give parametric estimates of both the mean and the variance of the data.  That is, I have various predictive factors and I want to determine if any of them influence the variance (not just the group mean).
I know that Poisson regression will not work because the variance is equal to the mean; this assumption is not valid in my case, so I know there is overdispersion.  However, a negative binomial model only generates a single overdispersion parameter, not one that is a function of the predictors in the model.  What model can do this?
Additionally, a reference to a book or paper which discusses the model and/or an R package which implements the model would be appreciated. 
 A: You can model the negative binomial dispersion parameter itself as a function of variables and parameters using the gamlss package in R.  I provide an excerpt from an introduction to it:

Why should I use GAMLSS
If your response variable is count (discrete) data it is very likely
  that the Poisson      distribution will not fit well. GAMLSS provides
  a variety of discrete distributions (including the negative binomial)
  that you can try out. The dispersion parameter can be also modelled as
  a function of explanatory variables.

The www.gamlss.org website has documentation and links to several papers on the approaches used in the package.
A: Stata provides the -gnbreg- command, which allows you to model the dispersion parameter. You can view Stata help for the command at http://www.stata.com/help.cgi?nbreg
Stata calls this the generalised negative binomial model. Joseph Hilbe discusses it in his book "Negative Binomial Regression", section 10.4, as "NB-H: Heterogeneous negative binomial regression".
