Skip to content

causalml-fall25/project-giocopp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Panel Counterfactual Estimators for Policy Shocks under Latent Trends

Causal ML Final Project

Submitted by: Giorgio Coppola

Writeup

📝 Read the writeup in PDF or in HTML

Overview

Simulation comparing panel causal estimators under latent factor trends (violations of parallel trends).

Research question: How do Two-Ways Fixed Effect (TWFE), Matrix Completion (MC), and Synthetic Difference in Difference (SynthDiD) compare in bias, coverage, and power when outcomes are sparse/binary and units follow latent interactive trends correlated with treatment assignment?

Application context: Italy–Libya MoU's effect on migrant mortality in the Central Mediterranean (May 2017 operational onset). The DGP is calibrated to match real IOM data patterns, but the goal is methodological.

Setup: 56 geographical grid cells × 35 months, binary outcome (any deaths in cell-month), treatment = proximity to Libya × post-May 2017.

Reproduce Results

To reproduce the analysis, run the following commands in R:

source("R/00_setup.R")
source("R/run_analysis.R")

Note: Full simulation may take from around 10 min to 1 h depending on your machine, with parallel computing.

To render the writeup (from the project root):

quarto render writeup/writeup.qmd --to pdf
quarto render writeup/writeup.qmd --to html

Repository structure

├── R/
│   ├── 00_setup.R         # Prepare environment
│   ├── 01_dgp.R           # Data generating process
│   ├── 02_calibration.R   # Calibration from IOM data
│   ├── 03_estimators.R    # TWFE, MC, SDID
│   ├── 04_simulation.R    # Power and scenario analysis
│   └── run_analysis.R     # Main script
├── data/
│   ├── dgp_anchor.rds 
│   └── iom_grid_panel.rds 
├── figures/               # Output plots
├── output/                # Summary tables
└── writeup/
    └── writeup.qmd        # Writeup in various formats

Data

Analysis uses a pre-computed calibrated synthetic dataset (data/calibration_targets.rds) derived from IOM Missing Migrants Project data. These contain summary statistics only (event rates, seasonality indices), with no reference to the original IOM incident data, which is not fully open source. The data is generated by running the following commands:

source("R/01_dgp.R")
source("R/02_calibration.R")
calibrate_from_iom()

These commands cannot be reproduced without access to the original data. Nevertheless, the analysis is fully reproducible without access to the original dataset.

Dependencies

tidyverse, lubridate, fixest, fect, Matrix, synthdid, patchwork, scales, furrr, progressr.

Install all dependencies running source("R/00_setup.R").

About

project-giocopp created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages