Firm-level Adjustment

Session 2 — the margins of adjustment, and a hands-on estimation

← Back to the course

45 min + exercise

What we cover

Slides — Part 2 (PDF)

Exercise 1 · Colombia → Venezuela

Estimate the firm-level effect of the 2014–2017 Colombia–Venezuela trade collapse on Colombian exporters — a sanctions-like shock seen from the exporter’s side, mirroring Crozet and Hinz (2020) and Aytun et al. (2025) at smaller scale. PPML on the intensive margin, LPM on the extensive margin, with placebo destinations.

Tech stack

Component What we use
Language R ≥ 4.3, scripts run from the command line via GNU Make
Data wrangling data.table, magrittr, stringr, countrycode, arrow
Estimation fixestfepois() for PPML, feols() for the LPM, with firm×product, product×destination (bilateral gravity) and product×year fixed effects, on Venezuela-exporting firms across Venezuela + placebo destinations
Output ggplot2, scales (event-study plot, margins decomposition, LaTeX table)
Packages installed on first run via pacman::p_load()

Data

  • Colombian export microdata (DANE/DIAN). Customs export declarations (Movimiento de exportaciones), scraped directly and credential-free from the DANE microdata catalog 472: microdatos.dane.gov.co/catalog/472. One row per exporter (nit) × product (hs6, 6-digit HS) × destination (ISO3) × year (2011–2019), with FOB value (USD) and net weight (kg). Restricted to manufactured exports (HS chapters 28–96).
  • Prepared bundle. A pre-scraped colombian_trade.csv.gz is distributed via the setup data link so the live session starts at the cleaning and estimation step; make skips the scrape when the bundle is present.

Exercise repo & README

References

Ahn, Daniel P., and Rodney D. Ludema. 2020. “The Sword and the Shield: The Economics of Targeted Sanctions.” European Economic Review 130: 103587. https://doi.org/10.1016/j.euroecorev.2020.103587.
Aytun, Ugur, Julian Hinz, and Cem Özgüzel. 2025. “Shooting down Trade: Firm-Level Effects of Embargoes.” Journal of Economic Behavior & Organization 231: 106821. https://doi.org/10.1016/j.jebo.2024.106821.
Chupilkin, Maxim, Beata Javorcik, and Alexander Plekhanov. 2026. “The Eurasian Roundabout: Trade Flows into Russia Through the Caucasus and Central Asia.” European Economic Review 187: 105340. https://doi.org/10.1016/j.euroecorev.2026.105340.
Crozet, Matthieu, and Julian Hinz. 2020. “Friendly Fire: The Trade Impact of the Russia Sanctions and Counter-Sanctions.” Economic Policy 35 (101): 97–146. https://doi.org/10.1093/epolic/eiaa006.
Crozet, Matthieu, Julian Hinz, Amrei Stammann, and Joschka Wanner. 2021. “Worth the Pain? Firms’ Exporting Behaviour to Countries Under Sanctions.” European Economic Review 134: 103683. https://doi.org/10.1016/j.euroecorev.2021.103683.
Drott, Constantin, Stefan Goldbach, and Volker Nitsch. 2024. “The Effects of Sanctions on Russian Banks in TARGET2 Transactions Data.” Journal of Economic Behavior & Organization 219: 38–51. https://doi.org/10.1016/j.jebo.2023.12.030.
Nigmatulina, Dzhamilya. 2022. Sanctions and Misallocation: How Sanctioned Firms Won and Russia Lost. CEP Discussion Paper 1886. Centre for Economic Performance, LSE. https://cep.lse.ac.uk/_NEW/publications/abstract.asp?index=9710.
Santos Silva, J. M. C., and Silvana Tenreyro. 2006. “The Log of Gravity.” Review of Economics and Statistics 88 (4): 641–58. https://doi.org/10.1162/rest.88.4.641.
Scheckenhofer, Lisa, Feodora A. Teti, and Joschka Wanner. 2025. Dodging Trade Sanctions? Evidence from Military Goods. Working Paper 11743. CESifo. https://www.ifo.de/en/cesifo/publications/2025/working-paper/dodging-trade-sanctions-evidence-military-goods.