You are on page 1of 11

GMM Estimation-

class notes
ECO 311
Professor Erdin
Dynamic Panel Estimation
O Suppose we estimate a dynamic model:

Yit = ai + dYit-1 + b1X1it + b2 X2it + b3 X3it + uit


O In Stata: xtabond Y X1 X2 X3, lags(1)
where we assume X1, X2 and X3 as exogenous and
they enter as instruments in the first-difference
equation (diff-GMM) for themselves (no lags). If you
want to use also lags of these variables as instruments,
then you have to use either the pre or the endogenous
option after the comma..
xtabond with endogenous variables
O xtabond Y X1, lags(1) pre(X2) endogenous
(X3)
where we assume X2 as predetermined and X3 as
endogenous. Predetermined variables use
instruments in levels from t-p-1, where p is the
maximum lag of the dependent variable (# in lags
option)used as explanatory variable (lagged
dependent) whereas endogenous variables enter in
the instrument matrix in levels from t-p-2 unless
you limit the number of lags for both cases.
xtabond2 command
O Another alternative is to use xtabond2 command
(ssc install xtabond2), a stata routine to implement
also the Blundell and Bond System- GMM
estimation for dynamic panel (1998).
O xtabond2 does diff-GMM (with nolevel option) as
well as system GMM (default)
System GMM
O The problem with diff-GMM is that the lags of
predetermined lagged dependent variables used as
instruments are uncorrelated (orthogonal) with the
to differenced error term (validity!) but are not
strictly correlated with the variable instrumented
(lack of relevance, or weak instrument problem).
O The idea is to improve the Arellano and Bond
estimators with a linear GMM model where the
variable l.y in level is instrumented with t-p-1 lags of
y and predetermined variable in first difference and
the exogenous variable in level. Hence, the system-
GMM improves the correlation of instruments with
the instrumented variable.
xtabond2 command
O xtabond2 replicates diff-GMM xtabond in the
following way:
O xtabond y X1 X2 X3, lags(1) noconst
is equivalent to
O xtabond2 y l.y X1 X2 X3, noleveleq gmm(l.y)
iv(X1 X2 X3)
Note: you have to drop the constant in xtabond to
replicate the xtabond results (diff-GMM) with
xtabond2.
Also, for xtabond2 to apply diff-GMM, use noleveleq
or just nolevel option, otherwise you get system-GMM
results.
xtabond2 command
O In xtabond2, the iv option displays the variables
that are strictly exogenous (they enter in first
difference (fd) equation in first difference (fd) form
and the command gmm specifies the endogenous
variable (l.y!) and the predetermined variables (that
enter in the fd equation in levels from t-p-1).
O xtabond y, lags(1) pre( X1 X2 X3) noconst
is equivalent to
xtabond2 y l.y X1 X2 X3, gmm(l.y X1 X2 X3)
noleveleq
Note: There is repetition in variable list in xtabond2
as compared to xtabond
xtabond2 command
O Differently from xtabond, in xtabond2, one can
exactly set the number of instruments.
For example: if you want to use only t-2 and t-3 level
of y, X1, X2 and X3 as additional instruments then
USE
O xtabond2 y l.y X1 X2 X3, gmm (l.y X1 X2 X3, lag
(2 3)) noleveleq
O If you want to use all the levels of y and only t-2
and t-3 of Xs, then
O xtabond2 y l.y X1 X2 X3, gmm (l.y) gmm(X1 X2
X3, lag (2 3)) noleveleq
xtabond2 command
O if you want to use all the level of Xs but only t-2
and t-3 level of y, then
O xtabond2 y l.y X1 X2 X3, gmm (l.y, lag(2 3))
gmm(X1 X2 X3) noleveleq
O In addition, you can use in xtabond command,
twostep robust option for twostep estimation
(default is onestep)
O Similarly, in xtabond2, you can specify twostep
robust.
O As can be seen, xtabond2 does everything xtabond
does with many additional features. But you have to
type the options yourselves (good for flexibility).
xtabond2 command
O If you want to limit the number of instruments in an efficient
way, in xtabond2 y l.y X1 X2 X3, gmm (l.y, lag(2 3) collapse)
gmm(X1 X2 X3) nolevel small
O Small for small sample size and t stats rather than z
O With robust option, no Sargan but its equivalent Hansen test is
generated with the same null: instruments are valid or exogenous:
cov(z,u)=0: model is well-specified. Additionally use AR(1) and
AR(2) for model diagnostics. Also, . Estat overid for Hansens test.
O If time dummies are used in the model, include them in iv(..)
option as they are exogenous.
O As always, with large T but small N, you do not need to do GMM
(as xtivreg with gmm option will work just as well)
O With large T, need to check stationarity of your panel variables:
use xtunitroot fisher Y, lags(aic 10) to determine the optimal
number of lags with aic minimization.
O If you estimate system-GMM without nolevel option, add nocons
to the options to estimate the level equation without the constant.
xtabond2 command
O If you want to limit the number of instruments in an
efficient way, in xtabond2 y l.y X1 X2 X3, gmm (l.y, lag(2
.) collapse) gmm(X1 X2 X3, lag(2 3)) small robust

O Note that with nolevel option, we have one-step robust


system-GMM. With lag specifications as above, for l.y,
we use t-2 and earlier dated lags of y as instruments for
the fd equations, and correspondingly, the lagged first-
differences (t-1 and earlier as instruments for the
equations in levels.
O For X1-X3 (endogenous, we use t-2 and t-3 lags (only) of
these variables for the fd model, and t-1 and t-2 lags of
first-differences for equations in levels. Recall system
GMM combines these in its instrument set to gain in
efficiency.

You might also like