GMM Stata Implementation ESS 2017
GMM Stata Implementation ESS 2017
Giovanni Bruno1
1 Bocconi University
1 Stata implementation
Notation
ivregress 2sls
ivregress gmm
2 Specification tests
Non-robust Hausman test
Robust Hausman test
Hansen-Sargan test of overidentifying restrictions
Testing for weak instruments
Limited Information ML (LIML)
Notation
Notation
z contains all available exogenous variable ==> if some of
the x are exogenous, say x1 , they have to be part of z and we
write z (x1 z1 ) , referring to
x1 as included exogenous variables with k1 = the number of
such variables
z1 as excluded exogenous variables (the strictly speaking
instrumental variables for many authors) with L1 = the number
of such variables
The remaining variables in x, say x2 , are the endogenous
variables in the model with k2 = the number of such variables
==> k = k1 + k2 and L = k1 + L1
==> The necessary order condition L k is satisfied if
and only if the number of endogenous variables is no
greater than the number of excluded exogenous, that
is L1 k2
Stata implementation Specification tests Panel data models with strictly exogenous instruments
ivregress 2sls
ivregress 2sls
ivregress 2sls
First-stage regressions
ivregress 2sls
Instrumented: hi_empunion
Instruments: totchr age female blhisp linc ssiratio
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
ivregress gmm
ivregress gmm
ivregress gmm
ivregress gmm
with ei = yi xi0 b
b
TSLS , i = 1, ..., n. Its implemented through
the ivregress gmm option: wmatrix(robust). Its the
default.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
ivregress gmm
ivregress gmm
ivregress gmm
ivregress gmm
Iterative GMM
ivregress gmm
ivregress gmm
legend: b/se
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
Robust
ldrugexp Coef. Std. Err. z P>|z| [95% Conf. Interval]
Instrumented: hi_empunion
Instruments: totchr age female blhisp linc ssiratio
.
. estat endogenous
Tests of endogeneity
Ho: variables are exogenous
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
. estat endogenous,forcenonrobust
Tests of endogeneity
Ho: variables are exogenous
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
. test v1hat
( 1) v1hat = 0
F( 1, 10081) = 26.43
Prob > F = 0.0000
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
Hansen-Sargan Test
.
. estat overid
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
.
. estat firststage, forcenonrobust all /// implements the Stock and
> ///Yogo (2005) weak instrument tests
>
.
Stata implementation Specification tests Panel data models with strictly exogenous instruments
LIML
Jeffrey M. Wooldridge.
Econometric Analysis of Cross Section and Panel Data.
The MIT Press, Cambridge, MA, 2nd edition, 2010.