Wiji Arulampalam, May 2006: I I I I
Wiji Arulampalam, May 2006: I I I I
GMM
1. OLS as a Method of Moment Estimator
Consider a simple cross-sectional case
yi = xi β + ui i=1,..,N β true coeff
1
∑
N i
x '
i yi − (
x '
)
i β̂ = 0 giving you β̂= ( X ' X )
−1
(X'y) [OLS]
1
Wiji Arulampalam, May 2006
Now assume that some of the x variables are correlated with the error term.
OLS estimator is inconsistent. We use instrumental variable estimation
using say z as instruments. Assume number of instruments=L and L ≥ K.
2
Wiji Arulampalam, May 2006
GMM chooses β to make (1) as small as possible using quadratic loss. i.e.
GMM estimator β minimises
'
⎡1 ⎤ ⎡1 ⎤
QN(β)= ⎢ ∑ z i ( yi − xiβ) ⎥ WN ⎢ ∑ z i ( yi − xiβ) ⎥
' ' ' '
⎣N i ⎦ ⎣N i ⎦
The solution is
−1
ˆβ = ⎡⎛ X' Z ⎞ W ⎛ Z' X ⎞ ⎤ ⎡⎛ X' Z ⎞ W ⎛ Z' y ⎞ ⎤ (N cancels)
⎢⎜ ∑ i i ⎟ ⎜ ∑ i i ⎟ ⎥ ⎢⎜ ∑ i i ⎟ ⎜ ∑ i i ⎟ ⎥
⎣⎝ i ⎠ ⎝ i ⎠ ⎦ ⎣⎝ i ⎠ ⎝ i ⎠⎦
= ( X'ZWZ'X ) ( X'ZWZ'Y )
−1
5
Wiji Arulampalam, May 2006
−1
⎡ ⎛ ⎞
−1
⎤
AVAR β̂ = ⎢( X'Z ) ⎜ ∑ Z i 'uˆ i uˆ i ' Z i ⎟ ( Z'X )⎥ (N cancels) (2)
⎢⎣ ⎝ i ⎠ ⎥⎦
6
Wiji Arulampalam, May 2006
−1
⎡1 ⎤
In order to generate the residuals, use GMM with W = ⎢
⎣N
∑ i i ⎥⎦
Z 'Z
( ) ( Z'Y )
−1 −1 −1
= X'Z[Z'Z] Z'X X'Z[ Z'Z ]
7
Wiji Arulampalam, May 2006
−1
⎡1 ⎤
• In order to generate the residuals, use GMM with W = ⎢
⎣N
∑ i i ⎥⎦
Z 'Z
• Can think of the equation (2) as giving you a covar matrix under
heteroskedasticity and serial correlation of unknown form.
• When L=K and hence X’Z is a square, then W does not matter.
• Stop with the second step (not a lot of efficiency gains in continuing).
8
Wiji Arulampalam, May 2006
• Additionally, since 2-step GMM depends on 1st step coeff est, the std.
error calculations tend to be too small…. Windmeijer provides a
correction (now implemented in some software – PcGive).
9
Wiji Arulampalam, May 2006
⎣ i ⎦ ⎣ i ⎦
• When L=K, Q( β̂ )=0;
• When L>K, then Q( β̂ )>0 although Q( β̂ )→0 in probability.
• So use this to derive the test by comparing the value of the criterion
function Q with its expected value under the null that the restrictions are
valid.
• This is simple when the optimal weighting matrix is used:
N Q( β̂ ) dist asym as a χ2(L-K) under H0. (Only valid under homosk.)
10
Wiji Arulampalam, May 2006
• If you only suspect that L1 are ok but L2 are not (where L=L1 + L2) then
can use N(Q-Q1) is asymp χ2(L2) where Q1 is the minimand when the non-
suspect instruments L1 are used.
11