Computing Generalized Method of Moments and
Generalized Empirical Likelihood with R
Pierre Chauss´e
Abstract
This paper shows how to estimate models by the generalized method of moments
and the generalized empirical likelihood using the R package gmm. A brief discussion is
offered on the theoretical aspects of both methods and the functionality of the package is
presented through several examples in economics and finance. It is a modified version of
Chauss´e (2010) published in the Journal of Statistical Software. It has been adapted to
the version 1.4-0.
Keywords:˜generalized empirical likelihood, generalized method of moments, empirical likeli-
hood, continuous updated estimator, exponential tilting, exponentially tilted empirical likeli-
hood, R.
1. Introduction
The generalized method of moments (GMM) has become an important estimation procedure
in many areas of applied economics and finance since Hansen (1982) introduced the two step
GMM (2SGMM). It can be seen as a generalization of many other estimation methods like
least squares (LS), instrumental variables (IV) or maximum likelihood (ML). As a result, it is
less likely to be misspecified. The properties of the estimators of LS depend on the exogeneity
of the regressors and the circularity of the residuals, while those of ML depend on the choice of
the likelihood function. GMM is much more flexible since it only requires some assumptions
about moment conditions. In macroeconomics, for example, it allows to estimate a structural
model equation by equation. In finance, most data such as stock returns are characterized
by heavy-tailed and skewed distributions. Because it does not impose any restriction on the
distribution of the data, GMM represents a good alternative in this area as well. As a result
of its popularity, most statistical packages like Matlab, Gauss or Stata offer tool boxes to use
the GMM procedure. It is now possible to easily use this method in R with the new gmm
package.
Although GMM has good potential theoretically, several applied studies have shown that the
properties of the 2SGMM may in some cases be poor in small samples. In particular, the
estimators may be strongly biased for certain choices of moment conditions. In response to
this result, Hansen, Heaton, and Yaron (1996) proposed two other ways to compute GMM: the
iterative GMM (ITGMM) and the continuous updated GMM (CUE)
1
. Furthermore, another
family of estimation procedures inspired by Owen (2001), which also depends only on moment
conditions, was introduced by Smith (1997). It is the generalized empirical likelihood (GEL).
1
See also Hall (2005) for a detailed presentation of most recent developments regarding GMM.