What is GMM?
Professor Suborno Aditya commented as such >> GMM is a dynamic estimator correcting both
hetero and serial corr however GLS is not a dynamic estimator but can correct for hetero, serial
corr and cross sectional dependence. GMM cannot correct for CD. GLS cannot account for IV (and
systems of equations) and differenced data and hence can only estimate using data at level while
GMM can do both at level and difference accounting for IV and systems of equations. Thus GLS is
weaker with respect to endogeneity.

How to run GMM model using STATA?
Professor Nasiru Inuwa commented about construction of GMM using STATA below>> Running
GMM in STATA can be done either using menu driven or command.
Using menu:
1. Having imported your data into STATA, using any of the ways you are familiar with.
2.Then go to statistics in the menu bar, scroll down to longitudinal/panel data, click on it
3. It wil give u drop down menu where u will see dynamic panel data, click on it, it will also show u
drop down list of Arrelano & Bond, Arrelano & Bover/ Blundell & Bond
4. Click on the one you want to do, it open dialog box for u showing dependent and independent
variables as well as one-step or two-step and other information
5. It will display results for u then u can go for sargan test and AB Serial correlation test. Aliter,
Using command:
1. First declare the data to be panel
2.Arellano and Bond (1991) 1st Difference GMM estimator
xtabond i f c, lag(1)
xtabond i f c, lag(1) artests(2)
xtabond i f c, lag(1) twostep
3.Arellano and Bover (1995) unifying GMM is the same as Blundell – Bond System GMM
Blundell and Bond (1998) System GMM
xtdpdsys i f c, lags(1) twostep
xtdpdsys i f c, lags(1) twostep artests(2)
4. Sargan test of overidentifying restrictions
estat sargan
5. Arellano-Bond test for zero autocorrelation in first-differenced errors
estat abond
For more on the command there are STATA journals that free

Differences between GLS and GMM
Professor Suborno Aditya commented as such >> GMM is a dynamic estimator correcting both
hetero and serial corr however GLS is not a dynamic estimator but can correct for hetero, serial
corr and cross sectional dependence. GMM cannot correct for CD. GLS cannot account for IV (and
systems of equations) and differenced data and hence can only estimate using data at level while
GMM can do both at level and difference accounting for IV and systems of equations. Thus GLS is
weaker with respect to endogeneity.

Guideline of GMM model
Professor Abu Subhi commented about GMM as such >>
1) One-step difference GMM with robust std. error:
xtabond2 y x1 x2, gmm(l.y x1 x2) iv(i.year) nol robust small
2) Two-step difference GMM with corrected std. error:
xtabond2 y x1 x2, gmm(l.y x1 x2) iv(i.year) nol twostep robust small
3) One-step system GMM with robust std error:
xtabond2 y x1 x2, gmm(l.y x1 x2) iv(i.year) robust small
4) Two-step system GMM with corrected std error:
xtabond2 y x1 x2, gmm(l.y x1 x2) iv(i.year) twostep robust small

How to run GMM using EVIEWS?
Professor Nasiru Inuwa has given a guideline of how to run GMM using EVIEWS as such >> You
can do it in eviews as follows: 1. Having imported d data into Eviews, then go to estimate equation
an specify d equation.
2. Then change d default from OLS to GMM
3. Then click on Wizard tab, then it wil guide u stepwise
4 u will com 2 a stage where it will ask to specify either diagonal or diffrence
5. U shud undertd dat Eviews has only Arrelano and Bond and Arrelano and Bover unlke Stata that
has BB and xtabond2

When to use GMM model?
Professor Atul Shiva talks about GMM Model as such>> Gmm is used when dynamic panel data is
to be applied on your data that have endogenity

Differnces between "difference GMM" and "system GMM"
Professor Mahyudin Ahmad talks about the differences between "Difference GMM and "System
GMM" as such>>
Difference GMM:
All variables in the model are first-differenced to eliminate time-invariant country effects, and then
lagged level of endogenous explanatory variables are used as the instruments. For lagged
dependent variable that may be correlated with error term, higher order lags of dependent variable
are used as instrument for lagged (one) dependent variable. Validity of moment conditions is
required for GMM estimator to yield unbiased and consistent estimators, i.e. the instruments (i.e.
the lagged dependent variables, and lagged vectors of endogenous explanatory variables) must not
be correlated with the error terms. There are however conceptual and statistical shortcomings with
this difference estimator. Alonso-Borrego and Arellano (1999), and Blundell and Bond (1998) point
out that when explanatory variables are persistent over time, lagged levels of these variables make
weak instruments for regression in differences, and instrument weakness in turn influences the
asymptotic and the small-sample performance of the difference estimator. Asymptotically, variance
of the coefficients will rise, and in small sample, Monte Carlo experiments show that weak
instruments can produce biased coefficients
System GMM:
To reduce potential biases and imprecision associated with difference estimator, a new estimator
that combines regression in differences with regression in levels is proposed by Arellano and Bover
(1995) and Blundell and Bond (1998) called system GMM. Whilst the instruments for regression in
differences remain the same, the instruments for regressions in levels will be the lagged differences
of the corresponding variables. These are appropriate instruments under an additional assumption i.
e. the differences of these variables must be uncorrelated with the country specific effect
notwithstanding the possible correlation between levels of the explanatory variables and the
country specific effect. This is because we assume the country specific effect is constant across
times (time-invariant).

XTBOND2
Professor Mohammad Ashraful Ferdous Chowdhury talks about GMM as such >>  XTBOND2 is
actually used for GMM. Since you have mix of i(0) and i(1), you better go for mg,pmg, DFE etc.

GMM is preferred method
Professor Mahyudin Ahmad commented about GMM test as such>> GMM is also the preferred
method to test for institutional impact on various economic indicators due to the fact that institutions
are frequently assumed to be endogenous.

Command for GMM in STATA
Professor Muhammad Anees commented as such> xtdpd, xtdpdsys and xtabond2

GMM can handle so many statistical issues
Professor Muzmmil Muzammil Bhatti commented> GMM provides solution for such problems at a
time. 1 endogenity bias 2 panel hetrogenity bias 3 over identifcation problem


Why we use panel GMM?
Professor Thasinul Abedin commented> What's about dynamic panel data models? In panel data,
usually in born heterogeneity prevails. No other techniques can successfully eliminate the problem
of heterogeneity except panel GMM. Yes it is true that most of the researchers are still using FE
OLS or RE OLS or Pooled OLS or FGLS or PCSE OLS. Empirical evidences suggests these
techniques can not successfully eliminate the heterogeneity problems. In this regard panel GMM
works better. One more thing, sometimes robust regression itself can not remove
heteroscedasticity. If T is greater than 30, one should go for panel long and short run analysis. In
this regard DOLS (Stock and Watson, 1993) works better for long run equation estimation.
Hossain Academy Note
GMM
Univariate Models
Multivariate Models
Panel Data Model