1 of 9

Gravity Modeling Tips & Traps for Practitioners�A Story and Five Pieces of Advice

Ben Shepherd, Principal.

1

2 of 9

A new TPRF publication

  • A guide aimed at:
    • Practitioners.
    • Applied researchers.
    • Students.

  • Download it from tprforum.org/resources!

  • Freely available to all, but a suggested donation to help us keep providing TPRF research webinars:
    • Low and middle income countries: $10.
    • High income countries: $25.

2

3 of 9

A gravity story: 2000 vs. 2022�Modeling a US-Japan FTA

The Wrong Way

The “Right” Way

  • Multiple years of data.

  • A structural model:
    • Importer-year fixed effects.
    • Exporter-year fixed effects.
    • Country-pair fixed effects.
    • RTA dummy.
    • PPML.

  • Results:
    • US -> Japan +5.4%.
    • Japan -> US +5.2%.
    • Third countries: small effects, often negative.
  • A single year of data.

  • An intuitive model:
    • Log exports.
    • RTA dummy.
    • Log distance and geographical controls.
    • Log GDP.
    • OLS.

  • Results:
    • US -> Japan +46%.
    • Japan -> US +46%.
    • Third countries: 0%.

3

4 of 9

1. Always ask a question that gravity is well placed to answer!

4

Don’t

Assume that any trade question fits gravity

Shoehorn an interesting question into gravity

Pursue an ill-defined research question

Do

Define your research question in detail

Match research question, data, and method

Focus on bilateral trade costs

Distinguish estimation from simulation

5 of 9

2. Make theory your friend!

5

Don’t

Estimate an intuitive model

Play fast and loose with theory’s implications

Ignore what theory says about data

Ignore what theory says about variables

Ignore what theory says about estimation

Ignore what theory says about simulation

Do

Use “structural” or “theoretical” gravity models

Choose one of the broad class of standard structural models

Note symmetries in estimation & simulation of standard models

Exercise care when developing theories

6 of 9

3. If you’re doing econometrics, do it right!

6

Don’t

Log linearize

Use OLS

Trust working papers that "improve" on PPML

Simplify fixed effects

Do

Use PPML

Value consistency over efficiency

Use fixed effects dictated by theory

Use ppmlhdfe in Stata

Use glmhdfe in R

Consider including domestic shipments

7 of 9

4. For policy work, you probably need a counterfactual simulation!

7

Don’t

Over-interpret parameter estimates

Calculate projections

Ignore 3rd country effects

Do

Carefully define policy shocks

Conduct theory-based simulations

Use ge_gravity in Stata or R

State limits and assumptions

Explain that results are not forecasts

8 of 9

5. If you want to go further, look to top new papers by leading academics!

8

Don’t

Do theory unless you’re a theorist

Over-interpret standard models

Shoehorn extensions into standard theory

Do

Think about multi-sector models

Think about dynamic models

Think about gravity with unemployment

Think about gravity with comparative advantage

Use domestic shipments to identify MFN policy effects

Make full use of replication code

9 of 9

What next?

  • Download the booklet from tprforum.org/resources.

  • To keep up to date with our publications and events, sign up for our mailing list: https://bit.ly/3K3BNEk.

  • Enjoy your gravity modeling!

  • Let us know what other TPRF publications could be useful!

9