This is the repository that holds the code for my thesis, "Quantifying the Impact of Omitted Variable Bias: A Comparison of Approaches to Sensitivity Analysis for Data Science and Applied Research."
The notebooks in the notebooks folder are numbered in the order they appear in the thesis.
1_illustration_non_identifiability- illustrates the non-identifiability result, showing that Oster's parameters can't identify Cinelli and Hazlett's partial R-squared parameters.2_mc_sim_null- Monte Carlo simulation for the case where there is no genuine treatment effect.3_mc_sim_non-null- Monte Carlo simulation for the case where there is a genuine treatment effect.4_oster_panels_rep- replication of Oster's NLSY panel application, comparing bias adjusted estimates and robustness conclusions under both frameworks.5_nunn_rep- replication of Nunn and Wantchekon's study on the slave trade and trust, comparing Oster's and Cinelli and Hazlett's conclusions on the same data.6_nunn_pure_cinelli- further robustness checks on the Nunn and Wantchekon replication done entirely within Cinelli and Hazlett's framework, including benchmarking against the full set of colonial rule controls.
oster_hazlett- package with the core implementations of the Oster and Cinelli and Hazlett frameworks, along with plotting helpers and tests, used throughout the notebooks above.nunn-wantchekon-dml- extends the Nunn and Wantchekon replication to the nonparametric sensitivity framework of Chernozhukov et al., using double machine learning. See its own readme for further details.thesis/figures- all figures generated by the notebooks that appear in the thesis.
The notebooks folder and the nunn-wantchekon-dml folder each have their own pyproject.toml and uv.lock, since the double machine learning analysis needs extra dependencies.