You are on page 1of 44

Topic 2:

The gravity equation


Overview
Short introduction
Theory in gravity
Empirical estimation
Application: Does WTO membership affect
trade?
Gravity equation
Gravity models explain trade flows
between countries j and k using market
size and distance as explanatory variables
Very successful in empirical work (high
explanatory power)
Augmented gravity equation to investigate
role of border effects, free trade
agreements, common language, etc. on
bilateral trade
The origins
Isaac Newtons Law of Universal
Gravitation (1687)
Attractive force F between two objects i and j is
given by
F is the attractive force, M are the masses, D
is distance between objects, G is gravitational
constant depending on units of measurement for
mass and force
2
ij
j i
ij
D
M M
G F =
Gravity equation in trade
Jan Tinbergen in 1962 proposed similar form to
explain trade flows
F
ij
trade flows from i to j
M
i
and M
j
are economic masses (size)
D
ij
is distance between the two locations
G is a constant
(equal to Newtons law if !=!=1 and "=2)
!
"
#
ij
j
i
ij
D
M M
G F =
Gravity equation in trade
Take logs to arrive at estimable equation
lnF
ij
= !lnM
i
+ !lnM
j
"lnD
ij
+ lnG + e
it
If e is classical error term, equation can be
estimated using OLS
M
i
supply of goods
M
j
demand for goods
D
ij
frictions in trade (trade costs)
Theory in gravity?
Starting with Anderson (AER 1979)
theoretical models have been derived that
lead to gravity-like equations
Mainly based on monopolistic competition
The simplest model
Countries i, j specialised in different varieties k
Identical demand
No trade costs
Country GDP: Y
i
= "
k
y
i
k
World GDP: Y
w
= "
i
y
i
Exports from i to j: X
ij
k
= s
j
y
i
k

X
ij
= "
k
X
ij
k
= s
j
"
k
y
i
k
= s
j
Y
i
=
= s
j
s
i
Y
w
= X
ji
X
ij
+ X
ji
= 2 (s
j
s
i
Y
w
) = (2/ Y
w
)Y
i
Y
j

The role of distance
Prices
CES utility function
Budget constraint
Demand for each product
i ij ij
p T p =
!
=
"
=
C
i
ij j
c U
1
/ ) 1 (
) (
# #
!
=
=
C
i
ij ij i j
c p N Y
1
) / ( ) / (
j j j ij ij
P Y P p c
! "
=
The role of distance
Price index in j
Total exports
) 1 /( 1
1
) 1 (
) (
!
!
"
=
"
#
$
%
&
'
(
=
)
C
i
ij i j
p N P
ij ij i ij
c p N X =
( )
! "
=
1
/
j ij j i ij
p p Y N X
The role of distance
Prices are difficult to measure, hence
model difference between p
ij
and p
i
as
Anderson and van Wincoop (2003): If T
ij
=
T
ji
, then
ij ij ij ij
d T ! " # + + = ln ln
! "
#
#
$
%
&
&
'
(
#
#
$
%
&
&
'
(
=
1
~ ~
j i
ij
w
j i
ij
P P
T
Y
Y Y
X
Estimable equation
Estimation strategy 1: Solve for price
indices
Estimation strategy 2: Use fixed effects to
control for unobserved price indices
ij w j i
ij ii j i ij
Y P P
d Y Y X
! "
" # $ "
" "
) 1 ( ) / 1 ln( )
~
ln( )
~
ln(
ln ) 1 ( ) 1 ( ) / ln(
1 1
% + + + +
% + % =
% %
Empirical uses of gravity
Particularly useful / popular because it can
be easily augmented with other variables

lnX
ij
= !lnY
i
+ !lnY
j
"lnd
ij
+ #Z
ij
+ e
it

In the context of the earlier model, Z
proxies factors that impact on transport
costs
Data requirements
Dependent variable: Trade flows between
country i and j
Economic mass
Generally measured as GDP
Widely available
Distance
Generally measured as great circle distance
between two capitals (minimum distance along the
surface)
Data available from some data sources, e.g.,
http://www.macalester.edu/research/economics/
PAGE/HAVEMAN/Trade.Resources/TradeData.html
The identification problem
Do variables really capture what they are
supposed to capture?
Unobserved bilateral country pair
characteristics
Time trends in panel data

lnX
ijt
= !lnY
it
+ !lnY
jt
"lnd
ij
+ #Z
ijt
+
+ !
ij
+ "
t
+ e
ijt
Brief Review: RE Estimation
! Random effects estimation puts u
ij
in the error term
! Assume
y
it
= #x
it
+ v
it
where v
it
= u
i
+ e
it
! RE amounts to estimating
(y
it
- $!y
i
) = # (x
it
- $!x
i
) + (v
it
- $!v
i
)
! where $ = 1 - $[%
2
e
/(%
2
e
+ T%
2
u
)]
! Special cases if $ = 0 and $ = 1
Brief Review: RE vs FE
! FE cannot estimate time invariant variables
! RE based on assumption that E(u
i
| x
i
) = 0
! Choose using a Hausman test
! FE is consistent if assumption fails, RE is not
! Statistically significant difference between the estimates
is interpreted as evidence against RE

! where H is distributed asymptotically as &
2
M

! If only one parameter of interest, use t statistic
( ) ( ) ( )
RE FE RE FE RE FE
! ! V V ! !

1
! !
"
! =
!
H
( ) ( )
2 2
)

( )

( /

RE FE RE FE
se se H ! ! ! ! " " =
Illustration
Using data for OECD countries, 1980 -
2000
(1) (2) (3) (4) (5) (6)
panel panel OLS with
country
dummies
OLS with
country
dummies
and time
dummies
FE with
country-pair
dummies
and time
dummies
RE with
country-pair
dummies
and time
dummies
Log distance -0.979 -0.885 -1.122 -1.133 Not
estimated
-0.964
(0.008)*** (0.009)*** (0.012)*** (0.012)*** (0.028)***
Y home 0.948 0.950 0.596 0.466 0.403 0.801
(0.006)*** (0.006)*** (0.042)*** (0.059)*** (0.031)*** (0.018)***
Y partner 0.882 0.882 1.040 0.919 0.907 0.912
(0.006)*** (0.006)*** (0.039)*** (0.050)*** (0.027)*** (0.017)***
fta 0.469 0.310 0.243 0.123 0.137
(0.023)*** (0.021)*** (0.020)*** (0.016)*** (0.016)***
Constant -20.267 -21.190 -13.129 -5.747 -14.264 -17.782
(0.227)*** (0.228)*** (0.804)*** (2.291)** (1.109)*** (0.677)***
Observations 13284 13284 13284 13284 13284 13284
R-squared 0.81 0.82 0.89 0.89 0.61
Standard errors in parentheses
* significant at 10%; ** significant at 5%; *** significant at 1%

Prob>chi2 = 0.0000
= 479.22
chi2(22) = (b-B)'[(V_b-V_B)^(-1)](b-B)
Test: Ho: difference in coefficients not systematic
B = inconsistent under Ha, efficient under Ho; obtained from xtreg
b = consistent under Ho and Ha; obtained from xtreg

time21 .1192557 .7052175 -.5859618 .
time19 .0283487 .6014997 -.573151 .
time18 -.073328 .4956382 -.5689662 .
time17 -.2078112 .3416377 -.549449 .
time16 -.2948453 .264275 -.5591202 .
time15 -.3452295 .2585844 -.603814 .
time14 -.3733772 .2489987 -.6223759 .
time13 -.3876499 .204316 -.5919659 .
time12 -.3953121 .2085065 -.6038186 .
time11 -.329257 .2784265 -.6076835 .
time10 -.3170783 .3449739 -.6620522 .0040154
time9 -.3945857 .26442 -.6590057 .0038288
time8 -.3297571 .3645879 -.694345 .0109167
time7 -.3248091 .437687 -.762496 .0188515
time6 -.2360411 .6229433 -.8589844 .0280628
time5 -.3475799 .5126343 -.8602142 .0281149
time4 -.4956576 .3466562 -.8423138 .0266676
time3 -.6001653 .214024 -.8141893 .0237784
time2 -.6584187 .1201724 -.7785912 .0200937
fta .1233579 .1369302 -.0135723 .
l_gdp_USD_pa .9073102 .9117582 -.004448 .0206251
l_gdp_USD_co .4033102 .8008224 -.3975122 .0256198

fixed . Difference S.E.
(b) (B) (b-B) sqrt(diag(V_b-V_B))
Coefficients
Hausman test of FE vs RE
A note on interpretation
FTA is a dummy variable in a log-linear
model
Effect of switching dummy from 0 to 1:
exp()-1
i.e., (exp(0.137)-1) = 0.147
% being member of a FTA is associated
with 15% higher trade
Application
Does WTO membership increase trade?
Andrew Rose, American Economic
Review, 2004
Related work on currency unions by
Andrew Rose and co-authors
Research question
What is the effect of WTO membership on
international trade?
Two different aspects:
How much more do countries within WTO
trade compared to non-members?
What is the trade effect of a country joining
(or leaving) WTO?
Equation to be tested
Equation to be tested
Equation to be tested
GSP: Generalized System of Preferences
GSP exempts WTO member countries from the most favoured nation
principle for the purpose of lowering tariffs for the least developing countries
(without also doing so for rich countries).
Data Sources
IMF Direction of Trade data covering 178
entities (territories) between 1948 to 1999
X includes exports + imports, deflated using US CPI
WTO information to create WTO and GSP variables
GDP and population from World Bank World
Development Indicators or IMF
WTO data to create FTA dummy: EU, US-Israel, NAFTA,
CARICOM, PATCRA, ANZCERTA, Mercosur
Currency Union: Currency interchangeable between two
countries at a 1:1 par for extended period of time CIA
World Factbook for other control variables
Data available on Andrew Roses website
Estimation approach
Pooled panel OLS (including year controls
and robust standard errors)
Cross section OLS on individual years
Panel estimation controlling for
unobservable country pair effects
Sensitivity analysis
Conclusion on Rose
Rose claims to find no effect of WTO
membership on trade
Is this the correct estimation of a gravity
model?
The problem of zeros
General gravity model

lnX
ij
= !lnY
i
+ !lnY
j
"lnd
ij
+ #Z
ij
+ e
it

Only estimated on country pairs where trade is
non-zero.
Potentially biased results if conclusions are
applied to all countries (okay if conclusions are
based on sample with only positive trade values)
The problem of zeros
Example: The distance puzzle
Generally studies find that distance coefficient
changes over time
At odds with idea that transport costs decreased
and that distance is dead
One explanation (Felbermayr and Kohler 2004):
model is mis-specified (extensive vs. intensive
margin)
Reduction in transport costs affects extensive
margin, mainly small volumes
Need to take zeros into account
Two views on zeros
Censoring (corner solution)
y take on 0 with positive probability, but is a
continuous random variable over strictly
positive values
y* = x! + u, u|x ~ Normal(0,%
2
)
y = max(0, x! + u)
Estimation using Maximum Likelihood (Tobit
model due to Tobin (1956))
Practical problem in gravity: ln(0) on LHS
Two views on zeros
Selection (incidental truncation)
trade data are available only for a clearly
defined subset of the population. Trade values
are missing as a result of the outcome of
another variable, namely, the decision to
trade.
y = x
1
! + u
d = 1[x" + v > 0]
Do not set y = 0 if d = 0! If d = 0, y is missing
Estimation using Selection Model
Two views on zeros
Selection (incidental truncation)
E(y|x, d = 1) = x
1
! + & $(x")
where $(x") = '(x") / ((x") is inverted Mills
ratio
Estimation of equation using OLS on selected
sample omits IMR (" not observed)
Consistent estimator of " is available from first
stage probit estimation
Probit: P(d = 1 | x) = ((x")
OLS: y = x
1
! + &!$(x!") + e
Applications
Felbermayr and Kohler (2004)
Corner Solution Model using Tobit estimation
Solves distance puzzle!
Helpman, Melitz, Rubinstein (2008)
Selection model
Implementation in Stata
Random effects:
tsset (panelunit) (time)
xtreg y X, re
Tobit:
tobit
xttobit
Selection
heckman

Reading
Feenstra, Robert C. (2004),Chapter 5
Head, K. (2003), Gravity for Beginners, mimeo
Baltagi, B., P. Egger, M. Pfaffermayr (2014), Panel
data gravity models of international trade, CESIfo
Working Paper 4616
Rose, A.K. (2002), Do we really know that the WTO
increases trade?, NBER Working Paper 9273
(published in AER 2004)
Felbermayr, G and W. Kohler (2006), Exploring the
intensive and extensive margins of world trade,
Review of World Economics, 142(4)
Helpman, E., M. Melitz, Y. Rubinstein (2008),
Estimating trade flows: trading partners and trading
volumes, Quarterly Journal of Economics, 123(2)

You might also like