# Optimal weighting matrix instrumental variables estimator

The formula for the optimal weighting matrix when you perform regression with more instrumental variables than endogenous predictors is the following:

$W_{opt} = (\frac{1}{N}Z'Z)^{-1}$

This tells us that we only have to look at the variance covariance matrix of the instruments,

But doesn't it make more sense to give more weight to the strongest instruments (or in other words, those who correlate better with the endogenous predictors)?

Under the assumption of homoskedasticity, $\Omega = \sigma^2 I$, the covariance matrix of the moment conditions becomes $$S = \frac{1}{n} E(Z'\Omega Z) = \sigma^2 \frac{1}{n} E(Z'Z)$$ and you are right in that we could simply ignore $\sigma^2$ in the weighting matrix and set $W = \left( \frac{1}{n}Z'Z \right)^{-1}$ because the GMM estimator does not change for weighting matrices that differ only by a multiplicative constant. In fact, if the sample is large enough the GMM estimator is consistent for any(!) weighting matrix given that it is positive definite. Hence you can choose arbitrary weighting matrices in theory in order to obtain consistent point estimates. However, this concerns only $\widehat{\beta}$. It also only holds for large enough samples as in small samples the weighting matrix can change the point estimates.
So how can we justify our choice of $W$ in practice?
We choose the weight such that it minimizes the asymptotic variance of the estimator. For this you need $\sigma^2$ which you can obtain as the residuals of the IV estimator $\widehat{\sigma}^2 = \frac{1}{n}\widehat{u}'\widehat{u}$. The variance of our estimator in this case is minimized by setting: $$\widehat{W} = \widehat{S}^{-1} = \left( \widehat{\sigma}^2 \frac{1}{n}Z'Z \right)^{-1}$$
• I should have been more precise. In small samples the choice of the weighting matrix matters because it influences the point estimates. In large samples the GMM estimator remains consistent for any choice of $W$. In this case you choose the weight such that it minimizes the asymptotic variance. These notes explain it very nicely (google.co.uk/…) p. 21 onwards, I just found them and I'll update my answer this evening to clarify it. – Andy Mar 11 '14 at 15:51