Conditional GMM estimation for gravity
models

Masaya Nishihata and Taisuke Otsu
July 18, 2019
KEO Discussion Paper No. 147

KEO Discussion Paper No. 147

CONDITIONAL GMM ESTIMATION FOR GRAVITY MODELS
MASAYA NISHIHATA AND TAISUKE OTSU
Abstract. This paper studies finite sample performances of the conditional GMM estimators
for a particular conditional moment restriction model, which is commonly applied in economic
analysis using gravity models of international trade. We consider the GMM estimator withgrowing moments and Dominguez and Lobato’s (2004) process-based GMM estimator. Under
the simulation designs by Santos Silva and Tenreyro (2006), we find that Dominguez and Lobato’s (2004) estimator is favorably comparable with the Poisson pseudo maximum likelihood
estimator, and outperforms other estimators.

1. Setup and estimators
This note is concerned with estimation of the conditional moment restriction modelE[Y |X] = exp(X 0 ),(1)

almost surely, where Y is a scalar dependent variable, X is a k-dimentional vector of covariates,
andis a k-dimensional vector of parameters. This model can be considered as an example ofthe nonlinear regression model for continuous Y or Poisson regression model for non-negative
integer Y . This particular model has been extensively applied and studied in economic analysis
using gravity models of international trade. See, e.g., Eaton and Kortum (2002), Anderson andvan Wincoop (2003), Santos Silva and Tenreyro (2006), among others.
Based on a random sample {Yi , Xi }ni=1 , popular estimation methods are the nonlinear leastPsquares (NLS) ˆN LS = arg min n 1 n {Yi exp(X 0 )}2 whose first-order condition isii=11nnX
i=1exp(Xi0 ˆN LS )} exp(Xi0 ˆN LS )Xi = 0,{Yi(2)and the Poisson pseudo maximum likelihood (PPML) method whose first-order condition isn1X{Yinexp(Xi0 ˆP P M L )}Xi = 0.

(3)

i=1

In an influential paper, Santos Silva and Tenreyro (2006) argued the inconsistency problemof the OLS estimator for the log-linear model under heteroskedasticity with normal errors, andinvestigated the NLS and PPML estimators. In particular, Santos Silva and Tenreyro (2006)
advocated the use of the PPML estimator under heteroskedastic errors rather than the NLSestimator. Their argument is that the NLS estimator tends to give more weights on the observations where exp(X 0 ˆN LS ) is large and is generally noisier, and the NLS estimator tends to bei1

less eﬃcient than the PPML estimator. A simulation study by Santos Silva and Tenreyro (2006)
endorsed the excellent performance of the PPML estimator.
In this note, we examine the finite sample performance of the conditional GMM estimator
for the particular model in (1). By the law of iterated expectations, the conditional momentrestriction (1) implies unconditional moment restrictions
E[{Yexp(X 0 )}h(X)] = 0,(4)for any function h(·) (as far as the above expectation is well-defined). Thus, both the NLS
estimator (which specifies h(X) = exp(X 0 )X) and PPML estimator (which specifies h(X) = X)
are consistent and also asymptotically normal under suitable regularity conditions.
In the context of estimation of the conditional moment restriction models, there are two
substantial issues for the choice of h(·). First, the conditional moment restriction in (1) implies
infinitely many unconditional moment restrictions in the form of (4). Thus, generally neither
the NLS nor PPML estimator achieves the semiparametric eﬃciency bound to estimate

inthe model (1). Currently several eﬃcient estimation methods are available, such as the optimal
instrumental variable estimator, and growing moment-based estimator (see, Chapter 7 of Hall(2005) for a survey). In our simulation study below, we consider the GMM estimator withgrowing moments (Donald, Imbens and Newey, 2003):!0 " n# 1nXX110ˆGM M = arg min
gni ( )gni ( ˆ)gni ( ˆ)nni=1i=1

where ˆ is a preliminary estimator, and gi ( ) = {Yi!
n1X
gni ( ) ,ni=1exp(Xi0 )}hni with a vector of basis

functions hni = (p1 (Xi ), . . . pkn (Xi ))0 for kn ! 1 as n ! 1. A common drawback of eﬃcientestimation methods for the conditional moment restrictions is that they typically involve sometuning parameters, such as the series lengths and bandwidths, to be chosen by the researcher.
The second issue is on consistency of point estimators. In an insightful paper, Dominguez andLobato (2004) argued that even though the conditional moment restriction (1) uniquely identifies
the parameters , the implied unconditional moment restriction (4) with finite dimensional h(·)
may not fully exploit information contained in (1) and identification of

may not be guaranteed.

In this case, the GMM estimator is typically inconsistent. To address this issue, Dominguez
and Lobato (2004) observed that the conditional moment restriction (1) is equivalent to thecontinuum of the unconditional moment restrictions E[{Yand proposed the following estimator
ˆDL = arg min" nnXX
l=1

i=1exp(X 0 )}I(X  x)] = 0 for all x,exp(Xi0 )}I(Xi  Xl ){Yi#2.

(5)

Dominguez and Lobato (2004) showed the consistency and asymptotic normality of this estimator
under mild regularity conditions. Although ˆDL does not achieve the semiparametric eﬃciency
bound, it does not involve any tuning parameters.
In the next section, we evaluate the finite sample properties of ˆGM M and ˆDL based on thesimulation designs motivated by gravity models.
22. Simulation
We now assess the finite sample performances of the conditional GMM estimators and other estimators by Monte Carlo simulations. We adopt simulation designs by Santos Silva and Tenreyro(2006). The dependent variable is generated by
Yi = exp( 0 +1 X1i +

2 X2i )⌘i ,for i = 1, . . . , 1000, where X1i follows the standard normal distribution, X2i is a dummy variable
that takes 1 with probability 0.4 and 0 otherwise, ⌘i is a log-normal random variable with mean
1 and variance

2i , and= ( 0,1,2)0 = (0, 1, 1)0 . The covariates X

1i and X2i are independent.

As in Santos Silva and Tenreyro (2006), we consider the following specifications of the conditionalvariance
Case 1:Case 2:
Case 3:
Case 4:2i:
20
i = exp( 2Xi ); Var(Yi |Xi ) = 1.
200i = exp( Xi ); Var(Yi |Xi ) = exp(Xi ).
20i = 1; Var(Yi |Xi ) = exp(2Xi ).
200i = exp( Xi ) + exp(X2i ); Var(Yi |X) = exp(Xi) + exp(X2i ) exp(2Xi0 ).

In Case 1, the NLS estimator is optimal because the conditional variance of Yi is constant.
However this case is typically unrealistic for bilateral trade models. In Case 2, the conditionalvariance of Yi equals its conditional mean, and the PPML estimator is optimal. In Case 3,
because ⌘i follows the log-normal with unit variance, the OLS estimator of the log-linear model
becomes consistent and the maximum likelihood estimator. In this case, the gamma pseudomaximum-likelihood (GPML) is optimal because the conditional variance of Yi is proportional
to the square of its conditional mean. Finally Case 4 is the most complicated and perhaps
realistic case. The conditional variance of Yi is a quadratic function of its conditional mean andother variables. For each case, we conduct simulations with and without rounding errors in thedependent variable.
For this model, we consider seven estimation methods: (i) DL, (ii) GMM, (iii) PPML, (iv)
GPML, (v) NLS, and (vi) OLS.1
Table 1 presents estimation biases and MSEs for

1and2based on 1000 Monte Carlo

replications. As shown in Santos Silva and Tenreyro (2006), OLS is very biased except for Case
3 and NLS is biased in the cases where heteroskedasticity is severe. Moreover, GPML is very
sensitive to rounding errors and does not perform well in the presence of rounding errors.
PPML performs very well for all cases. In each case, PPML has small bias and is relatively
robust to rounding errors in the dependent variable. GMM is more robust to the rounding
errors than PPML. Similar to NLS, however, GMM is somewhat biased in the cases whereheteroskedasticity is severe. Among the methods we consider, the performance of DL is thebest. The biases of DL are small in various situations and outperforms PPML in terms of MSE
in the cases where heteroskedasticity is severe (Cases 3 and 4). This outperformance of DL ismaintained even when the rounding errors are present. It is also remarkable that DL performs
as well as PPML even for Case 2, where PPML is optimal.
1For GMM, we set ˆ as the PPML estimator and h20ni = (1, X1i , X2i , X1i , X1i X2i ) . Our preliminary simulationsuggests that the results are less sensitive to the choice of hni .

3Overall, our simulation results suggest that DL is favorably comparable to PPML and is better
than other estimation methods.
References[1] Anderson J. E. and E. van Wincoop (2003) Gravity with gravitas: a solution to the border puzzle, American
Economic Review, 93, 170-192.
[2] Dominguez, M. A. and I. N. Lobato (2004) Consistent estimation of models defined by conditional moment
restrictions, Econometrica, 72, 1601-1615.
[3] Donald, S. G., Imbens, G. W. and W. K. Newey (2003) Empirical likelihood estimation and consistent tests
with conditional moment restrictions, Journal of Econometrics, 117, 55-93.
[4] Eaton J. and S. S. Kortum (2002) Technology, geography, and trade, Econometrica, 70, 1741-1779.
[5] Hall, A. R. (2005) Generalized Method of Moments, Oxford University Press.
[6] Santos Silva, J. M. C. and S. Tenreyro (2006) The log of gravity, Review of Economics and Statistics, 88,641-658.

4

Table 1. Simulation Results
Without rounding error

With rounding error

11

Bias

0.04365
0.023810.021440.095140.00314-0.00450
0.00260
0.001350.020940.00034-DL0.00041 0.00071
GMM -0.00041 0.00051
PPML 0.00043 0.00034
GPML 0.00612 0.00180
NLS
0.00082 0.00108
OLS
0.21111 0.04540

Case 2: Var(Yi |Xi ) = exp(Xi0 )-0.00042 0.00224
0.02723 0.00154
0.00058 0.00331
0.00167 0.00052-0.00049 0.00157
0.02279 0.00090
0.00132 0.00350
0.13728 0.02402
0.00089 0.00363
0.00307 0.00108
0.19923 0.04201-

0.048200.02877
0.023120.11457
0.00389-0.005020.00438
0.002250.02023
0.00367-DLGMM
PPMLGPML
NLS
OLS

Case 3: Var(Yi |Xi ) = exp(2Xi0 )0.00358 0.00488
0.02962 0.00386
0.02943 0.03336-0.00969 0.01174
0.00826 0.00973
0.02280 0.00536
0.00367 0.00398
0.19904 0.04305
0.07932 0.80596
0.10326 1.11281
0.00226 0.00272-

0.061480.063440.03649
0.16872
0.08753-0.009240.03969
0.011440.03557
0.96348-

Case 4: Var(Yi |Xi ) = exp(Xi0 ) + exp(X2i ) exp(2Xi0 )0.00809-0.00549 0.01298
0.03703 0.00971
0.04405
0.020140.00570 0.06553-0.00407 0.02040
0.040610.01066-0.01108 0.02275
0.02559 0.01133
0.01385
0.00341-0.00467 0.01256
0.12917 0.02413
0.09926
8.847440.03984 3.43802
0.31984 8.92830
0.04349
0.01927-0.12998 0.02318-0.01602
0.07003
0.02352
0.02772
2.97709-0.00286
0.01192
0.004800.00096
1.111700.00070

Bias2DL0.00012 0.00058
GMM -0.00064 0.00012
PPML 0.00048 0.00025
GPML 0.01376 0.00449
NLS
0.00015 0.00006
OLS
0.38977 0.15339

DL0.00146
GMM -0.01351
PPML -0.00174
GPML 0.00505
NLS
0.31399
OLS
0.13356

Bias2MSE
BiasMSE
Case 1: Var(Yi |Xi ) = 1
0.00221 0.00211
0.02338 0.00120-0.00167 0.00206
0.00278 0.000140.00122 0.00075
0.01959 0.00068
0.00903 0.00682
0.11126 0.02101
0.00051 0.00030
0.00228 0.00007
0.35705 0.13061--0.00113-0.00987-0.00420-0.00016
0.10079-0.00014

MSE

MSE

Economic Policy Department, Mitsubishi UFJ Research and Consulting Co., Ltd., 5-11-2 Toranomon, Minato-ku, Tokyo 105-8501, Japan.
Email address: nishihata@murc.jp
Department of Economics, London School of Economics, Houghton Street, London, WC2A
2AE, UK, and Keio Economic Observatory (KEO), 2-15-45 Mita, Minato-ku, Tokyo 108-8345,
Japan.
Email address: t.otsu@lse.ac.uk

5