Skip to main content
Log in

GLM estimation of trade gravity models with fixed effects

  • Published:
Empirical Economics Aims and scope Submit manuscript

Abstract

Many empirical gravity models are now based on generalized linear models (GLM), of which the poisson pseudo-maximum likelihood estimator is a prominent example and the most frequently used estimator. Previous literature on the performance of these estimators has primarily focussed on the role of the variance function for the estimators’ behavior. We add to this literature by studying the small sample performance of estimators in a data-generating process that is fully consistent with general equilibrium economic models of international trade. Economic theory suggests that (1) importer- and exporter-specific effects need to be accounted for in estimation, and (2) that they are correlated with bilateral trade costs through general equilibrium (or balance-of-payments) restrictions. We compare the performance of structural estimators, fixed effects estimators, and quasi-differences estimators in such settings, using the GLM approach as a unifying framework.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

Notes

  1. In some of the aforementioned work, e.g., in Eaton and Kortum (2002) or Waugh (2010) structural constraints are assumed by the underlying theory but not imposed in estimation. As shown by Fally (2014), estimation with fixed effects is consistent with such structural constraints if adding-up constraints are imposed on trade flows, or the model is estimated by a Poisson regression.

  2. Examples include Eaton and Kortum (2002), Anderson and van Wincoop (2003), Aviat and Coeurdacier (2007), Dekle et al (2007), Baier and Bergstrand (2009), Novy (2013), and Bergstrand et al (2013), among many others. In the applications cited, the number of countries (or other geographical units such as provinces or states) ranges from about 20 to 40 and zero trade flows are rare.

  3. This is different from the better-known “fixed-T large-N”-version of the incidental parameters problem which constitutes an inability to estimate the so-called nuisance parameters (the fixed effects in this context) consistently—an inconsistency that passes over to the “common parameters” (\(\beta \) in this context). In the gravity equation setup, both dimensions (numbers of exporter and importers) increase as the number of countries \(C\) increases. For every additional country, there are \(2\times (C-1)\) additional observations but only 2 additional parameters (\(e_C\) and \(m_C\)). Thus, all parameters are estimated with less bias as \(C\) increases. The source of the incidental parameters problem here is the fact that the rate of convergence for the “common parameters” \(e_i\) and \(m_j\) is slower.

  4. Such trade flows may emerge particularly with or among less developed countries, where reporting standards are poor. For instance, Egger and Nigai (2014) illustrate that structural parameterized GLM gravity models tend to predict large bilateral trade flows with much smaller error than small trade flows.

  5. The Negative Binomial estimator is only an LEF member for a given value of the overdispersion parameter, say \(\alpha \) in \(\mu _{ij}+\alpha \mu _{ij}^2\). In Table 1 and in what follows, we consider the Negative Binomial GLM estimator with overdispersion parameter fixed at 1.

  6. As a consequence, omitting \(e_i + m_j\) from the specification in (2) or simply replacing it by a log-additive function of GDP and/or GDP per capita of countries \(i\) and \(j\), as had been done for decades in a-theoretical empirical gravity models, will generally lead to inconsistent estimates of \(\beta \), the semi-elasticity of trade with respect to \(d_{ij}\).

  7. In the interest of brevity, we skip the exporter-specific preference parameter introduced in Anderson and van Wincoop (2003) without loss of generality.

  8. For DGPs of the type (5)–(9), fixed effects estimates of \(m_j\) and \(e_i\) could be used to obtain estimates of \(P^{1-\alpha }\) and \(Y_i\) (see Fally 2014, Lemma 1A).

  9. Structural estimators based on log-linearization, such as structurally iterated least squares (Head and Mayer 2014) suffer from the same problems as OLS: for instance, in general they are inconsistent if the errors are heteroskedastic. In contrast to the algorithm presented here, structurally iterated least squares also requires data on a country’s trade and trade costs with itself.

  10. The conditioning variables are \(d_{ik},d_{li},e_i,e_l,m_k,m_j\) in the first equation, and the corresponding variables in the second.

  11. As with the standard gravity equation, the previous literature proceeded by log-linearization and OLS estimation, which is subject to the same problems as discussed in Sect. 1.

  12. The first and second moments of these variables are broadly in line with the data used in the application in Sect. 4 below.

  13. To see this, note that as the number of countries grows to infinity countries’ consumer and producer prices will be entirely determined by the rest of the world. Hence, for any arbitrary pair of countries, the impact of bilateral trade costs on price indices, producer prices, or factor costs will be infinitesimally small. The correlation between bilateral trade costs and any multilateral variable (such as gross domestic product, wages, or prices) approaches zero as the number of countries grows large.

  14. The NB-GLM estimators have their overdispersion parameter fixed at 1. Theoretically, one could improve on this by estimating an optimal overdispersion parameter in a two-step NB Quasi-Generalized Pseudo-Maximum Likelihood procedure, as proposed by Bosquet and Boulhol (2014). Table 12 in the Appendix displays results for this estimator. We found no or negligible efficiency gains in our DGPs from doing so. Moreover, the estimator had severe difficulties in many of our DGPs. The reason is that NB QGPML estimates the coefficients \(a\) and \(b\) in the variance function \(a\mu _{ij}+b\mu _{ij}^2\) – which are zero in some of our DGPs – to build an overdispersion parameter \(b/a\). Note that naïvely estimating the overdispersion jointly with \(\beta \) in a quasi-Likelihood approach falls outside of GLM estimation and its property of consistency.

  15. The standard errors for the QD-P estimator are derived from resampling the data 100 times for subsamples of one-quarter of the number of countries

    Table 9 Estimation results: Gravity model of trade, \(C=94\), \(N=8,836\)
  16. Corresponding figures for the IS estimators can be found in the Appendix (Figs. 34).

    Fig. 2
    figure 2

    Fixed effects estimators: Density of deviance residuals. Notes: The figure plots kernel density of deviance residuals for fixed effects GLM estimates of the trade gravity model (21), corresponding to columns 2–5 of Table 9

  17. Some of these issues might carry over to the tetradic-differenced estimators as discussed in Head and Mayer (2014) which are also based on ratios of exports.

References

  • Adams N, Crowder M, Hand DJ, Stephens D (ed) (2004) Methods and models in statistics. In Honour of Professor John Nelder, FRS. Imperial College Press, London, UK

  • Allen T, Arkolakis C, Takahashi Y (2014) Universal gravity unpublished manuscript. Yale University, New Haven

    Book  Google Scholar 

  • Anderson JE, van Wincoop E (2003) Gravity with gravitas: a solution to the border puzzle. Am Econ Rev 93(1):170–192

    Article  Google Scholar 

  • Anderson JE, Yotov YV (2010) The changing incidence of geography. Am Econ Rev 100(5):2157–2186

    Article  Google Scholar 

  • Anderson JE, Yotov YV (2012) Gold standard gravity. NBER Working Papers No 17835

  • Arkolakis C, Costinot A, Rodríguez-Clare A (2012) New trade models, same old gains? Am Econ Rev 102(1):94–130

    Article  Google Scholar 

  • Aviat A, Coeurdacier N (2007) The geography of trade in goods and asset holdings. J Int Econ 71:22–51

    Article  Google Scholar 

  • Baier SL, Bergstrand JH (2009) Bonus vetus ols: a simple method for approximating international trade-cost effects using the gravity equation. J Int Econ 77(1):77–85

    Article  Google Scholar 

  • Baltagi BH (2013) Econometric analysis of panel data, 5th edn. Wiley, Hoboken

    Google Scholar 

  • Baltagi BH, Egger PH, Pfaffermayr M (2014) Panel data gravity models of international trade. In: Baltagi BH (ed) The Oxford handbook of panel data. Oxford University Press, Oxford, forthcoming

    Google Scholar 

  • Bergstrand JH, Egger PH, Larch M (2013) Gravity redux: estimation of gravity-equation coefficients, elasticities of substitution, and general equilibrium comparative statics under asymmetric bilateral trade costs. J Int Econ 89(1):110–121

    Article  Google Scholar 

  • Bosquet C, Boulhol H (2009) Gravity, log of gravity and the “distance puzzle” Unpublished manuscript. Université Paris Panthéon-Sorbonne, Paris

    Google Scholar 

  • Bosquet C, Boulhol H (2014) Applying the glm variance assumption to overcome the scale-dependence of the negative binomial qgpml estimator. Econometric Rev 33(7):772–784

    Article  Google Scholar 

  • Cameron AC, Trivedi PK (2005) Microeconometrics: methods and applications. Cambridge University Press, Cambridge

    Book  Google Scholar 

  • Charbonneau KB (2012) Multiple fixed effects in nonlinear panel data models—theory and evidence unpublished manuscript. Princeton University, Princeton

    Google Scholar 

  • Dekle R, Eaton J, Kortum SS (2007) Unbalanced trade. Am Econ Rev 97(2):351–355

    Article  Google Scholar 

  • Eaton J, Kortum SS (2002) Technology, geography, and trade. Econometrica 70:1741–1779

    Article  Google Scholar 

  • Egger PH, Nigai S (2014) Structural gravity with dummies only. CEPR Discussion Paper

  • Egger PH, Larch M, Staub KE, Winkelmann R (2011) The trade effects of endogenous preferential trade agreements. Am Econ J: Econ Policy 3(1):113–143

    Google Scholar 

  • Egger PH, Larch M, Staub KE (2012) The log of gravity with correlated sectors: an application to structural estimation of bilateral goods and services trade. CEPR Discussion Paper No. 9051, Revised version

  • Fally T (2014) Structural gravity with fixed effects, unpublished manuscript. University of Colorado, Colorado

    Google Scholar 

  • Fernández-Val I, Weidner M (2013) Individual and time effects in nonlinear panel models with large n, t. CeMMAP working paper CWP60/13, Centre for Microdata Methods and Practice, Institute for Fiscal Studies

  • GeoDist Database (2013) Centre d’Études prospectives et d’informations internationales, Accessed in Oct 2013 on http://www.cepii.fr

  • Gómez Herrera E (2013) Comparing alternative methods to estimate gravity models of bilateral trade. Empir Econ 44:1087–1111

    Article  Google Scholar 

  • Hahn J, Newey W (2004) Jackknife and analytical bias reduction for nonlinear panel models. Econometrica 72(4):1295–1319

    Article  Google Scholar 

  • Head K, Mayer T (2014) Gravity equations: workhorse, toolkit, and cookbook. In: Gopinath, Helpman, Rogoff (eds) Handbook of international economics, vol 4

  • Martin W, Pham CS (2008) Estimating the gravity model when zero trade flows are frequent. Working Paper Economics Series 2008_03, Deakin University

  • Martínez Zarzoso I (2013) The log of gravity revisited. Appl Econ 45(3):311–327

    Article  Google Scholar 

  • McCullagh P, Nelder JA (1989) Generalized linear models, 2nd edn. Chapman and Hall, London

    Book  Google Scholar 

  • Mélitz J, Toubal F (2014) Native language, spoken language, translation and trade. J Int Econ 93(2):351–363

    Article  Google Scholar 

  • Nelder JA, Wedderburn RW (1972) Generalized linear models. J R Stat Soc A 135(3):370–384

    Article  Google Scholar 

  • Novy D (2013) International trade without ces: estimating translog gravity. J Int Econ 89(2):271–282

    Article  Google Scholar 

  • Pierce DA, Schafer DW (1986) Residuals in generalized linear models. J Am Stat Assoc 81:977–986

    Article  Google Scholar 

  • Santos Silva JMC, Tenreyro S (2006) The log of gravity. Rev Econ Stat 88(4):641–658

    Article  Google Scholar 

  • Santos Silva JMC, Tenreyro S (2011) Further simulation evidence on the performance of the poisson pseudo-maximum likelihood estimator. Econ Lett 112:220–222

    Article  Google Scholar 

  • Santos Silva JMC, Tenreyro S, Windmeijer F (2015) Is it different for zeros? Discriminating between models for non-negative data with many zeros. J Econom Methods (forthcoming)

  • Waugh ME (2010) International trade and income differences. Am Econ Rev 100(5):2093–2124

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peter H. Egger.

Additional information

The authors gratefully acknowledge helpful comments by Badi Baltagi, Michael Pfaffermayr, João Santos Silva, and two anonymous reviewers on an earlier version of the manuscript. Egger acknowledges funding by Czech Science Fund (GA ČR) through Grant Number P402/12/0982. The authors acknowledge financial support from the Faculty of Business and Economics, University of Melbourne.

Appendix

Appendix

1.1 First-order conditions for fixed effects

The fixed effects \(e_i\) and \(m_j\) are estimated as the coefficients on a set of exporter and importer dummy variables, respectively:

$$\begin{aligned} e_i=\sum _{k=2}^Ce_{k}D_{ki}, \quad m_j=\sum _{k=2}^Cm_{k}D_{kj}, \end{aligned}$$
Fig. 3
figure 3

Iterative structural estimators: Predictions and Pearson residuals. Notes: The figure plots predictions of trade flows against Pearson residuals for iterative structural GLM estimates of the trade gravity model (21), corresponding to columns 6–9 of Table 9

where \(D_{ki}=\varvec{1} (i=k)\), \(k=2,\ldots ,C\) are the exporter indicator variables; and \(D_{kj}=\varvec{1} (j=k)\), \(k=2,\ldots ,C\), the importer indicator variables. The constant \(\beta _0\) absorbs \(e_1\) and \(m_1\). Then the \(2\times (C-1)\) first-order conditions for the parameters \(e_k\) and \(m_k\), for \(k=2,\ldots ,C\), are

$$\begin{aligned}&\sum _{i=1}^C\sum _{j=1}^C \frac{\left[ X_{ij} - \exp \left( \sum _{k=2}^Ce_{k}D_{ki} + \sum _{k=2}^Cm_{k}D_{kj} + d_{ij}'\beta \right) \right] }{V(X_{ij})}\\&\qquad \times \exp \left( \sum _{k=2}^Ce_{k}D_{ki} + \sum _{k=2}^Cm_{k}D_{kj} + d_{ij}'\beta \right) D_{ki}=0, \\&\sum _{i=1}^C\sum _{j=1}^C \frac{\left[ X_{ij} - \exp \left( \sum _{k=2}^Ce_{k}D_{ki} + \sum _{k=2}^Cm_{k}D_{kj} + d_{ij}'\beta \right) \right] }{V(X_{ij})}\\&\qquad \times \exp \left( \sum _{k=2}^Ce_{k}D_{ki} + \sum _{k=2}^Cm_{k}D_{kj} + d_{ij}'\beta \right) D_{kj}=0. \end{aligned}$$
Fig. 4
figure 4

Iterative-structural estimators: Density of deviance residuals. Notes: The figure plots kernel density of deviance residuals for iterative-structural GLM estimates of the trade gravity model (21), corresponding to columns 6–9 of Table 9

Table 10 Alternative scenario \(\alpha =-2\) (1,000 replications)
Table 11 \(t\)-statistics for iterative-structural estimators (baseline specification, \(C=10\)), 1,000 replications
Table 12 Negative Binomial Quasi-generalized pseudo-maximum likelihood estimation (Baseline specification, 1,000 replications)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Egger, P.H., Staub, K.E. GLM estimation of trade gravity models with fixed effects. Empir Econ 50, 137–175 (2016). https://doi.org/10.1007/s00181-015-0935-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00181-015-0935-x

Keywords

JEL Classification

Navigation