# dispersiontest() estimates dispersion too small

I am using dispersiontest(fit, trafo=2) from the AER package in R to see if my data is overdispersed and what the dispersion parameter $$\alpha$$ is. Since I use trafo=2 I assume that $$Var(y) = \mu + \alpha \cdot \mu^2$$.

However, I get a dispersion parameter of about $$0.4$$, which is not at all in line with mean(y) = 68 and var(y) = 8124, because obivously $$68 + 0.4\cdot68^2 = 1917$$. If I estimate $$\alpha$$ "by hand", i.e. just solving the above equation for $$\alpha$$, I get a value of $$51$$.

Could somebody explain whydispersiontest estimates $$\alpha$$ so small?

The thing is that you don't estimate $$\alpha$$ by solving for it from the formula that models $$Var(y)$$ in terms of $$\mu$$. Instead $$\alpha$$ is estimated by analyzing how $$Var(y)$$ changes with $$\mu$$ locally in your data. It is not a value that comes from the global estimations of $$Var(y)$$ and $$\mu$$ but rather from its local estimations.
Measuring and using these local estimations to estimate $$\alpha$$ is done via regression, as explained in the Details section of the documentation of dispersiontest():
• thank you! I see what you mean, that means $Var(y) = \mu + \alpha \cdot \mu$ is just not generally correct? What exactly does "locally" mean here? For which datapoints is the equation true? – msloryg Jun 24 '19 at 10:08
• No, I don't mean that $Var(y) = \mu + \alpha * \mu^2$ is not generally correct. What I mean is that this formula proposes a relationship between $Var(y)$ and $\mu$ as when you propose a relationship between a dependent variable y and a variable x. The relationship is theoretical and is estimated using regression on the observed data points (x,y). Here is the same thing, you locally observe values of $Var(y)$ and $\mu$ ("local" means in a neighbourhood around each x) and estimate the relationship between $Var(y)$ and $\mu$ using regression. – mastropi Jun 24 '19 at 10:48