This repository contains a collection of Jupyter notebooks focused on causal inference for both experimental and observational data. Each notebook provides examples using simulated data.
The notebooks are organized as follows:
- Selection Bias: This notebook shows how selection bias arise from observational data.
- CUPED: This notebook shows how to use regression adjustment and CUPED with heterogeneous treatment effects.
- Multiple Randomized Designs: This notebook demonstrates how to analyze marketplaces where SUTVA is violated.
- Power Analysis: This notebook shows how to conduct power analysis for randomized experiments.
- Instrumental Variables: This notebook shows how to use instrumental variables to estimate causal effects and the case of weak instruments.
- Regression Discontinuity Design: This notebooks is based on Chapter 17 of the book Causal ML. It shows RDD with a sharp design with and without covariates.
- Difference-in-Differences: This notebook shows how to use two-way fixed effects estimator in the traditional 2x2 setting and the problems with staggered adoption.
- Modern DiD Approaches: This notebook uses Callaway and Sant'Anna (2020) to show how to estimate ATT with staggered adoption.
- Synthetic Control: Estimation of treatment effects using synthetic control methods.
- Matching: IN PROGRESS