Different textbooks seem to have different definitions for the weight matrix W in the Iteratively Re-Weighted Least Squares (IRWLS) algorithm. They should be equivalent but I can't seem to piece it together. As far as I can tell, there are no differences in any other part of the algorithm which would "cancel out" the differences.
I am considering, for example, Dobson and Faraway.
$W = diag(w_1, w_2, \ldots, w_n)$ where:
Method 1:
$$w_i = \Big[ V(\hat{\mu})(g'(\hat{\mu}))^2 \Big]^{-1}$$
Method 2:
$$w_i = \Big[ Var(y_i)(g'(\hat{\mu}))^2 \Big]^{-1}$$
Please note the variance function $V(\mu)$ is not the same as the variance of the distribution of $Y$, $Var(y_i)$. What's the discrepancy? Is the second dropping a dispersion parameter to "simplify" the exposition? Which one should I use?
Which is the most general?
I realize IRWLS is implemented, but I need to know for my coursework.