# Modelling both mean and dispersion of count data

I have a model of the following form:

$P(Y \mid X) = \,D(\mu,\sigma^2) ~~\text{where}$

$\mu = f(X) ~~\text{and}~~ \sigma^2=g(X)$

where $y$ is the response vector of count data, $X$ is the predictor matrix, $f()$ and $g()$ are linear inverse link functions (I don't mind what they are), and $D$ is some probability distribution (maybe Poisson with overdispersion).

Does this model have a name? How would you estimate it? Is there a package in R that can do it?

I understand that usually one would use negative binomial or Poisson GLM, but here I have heteroscedasticity that depends on $X$ not in the same way as the expected value of the response (that is $f()$ and $g()$ are not the same).

Thank you for your help!

-
seems like a quasi likelihood equation. you model the "mean function" and the "variance function" - could possibly be a "generalised GARCH" model for discrete data, although im not familiar with software to estimate these. i look for financial stochastic volatility models as a start, though these are generally based on brownian motion or geometric brownian motion, rather that discrete data. –  probabilityislogic Jul 3 '12 at 7:39
Would presumably fit within the framework of Generalized additive models for location, scale and shape, but maybe there's a simpler way, as that seems overly general. –  onestop Jul 3 '12 at 8:40
I'm pretty sure I just reformulated the math to something equivalent, but feel free to revert if I missed something. –  conjugateprior Jul 3 '12 at 11:01

Take a look at 'double generalized linear models'.

e.g.

Smyth, G. K., and Verbyla, A. P. (1999). Double generalized linear models: approximate REML and diagnostics. In Statistical Modelling: Proceedings of the 14th International Workshop on Statistical Modelling, Graz, July 19 – 23, 1999, H. Friedl, A. Berghold, G. Kauermann (eds.). International Workshop on Statistical Modelling, Graz. Pages 66-80.

(http://www.statsci.org/smyth/pubs/iwsm99.ps)

-