This repo contains 内容讲解 和 Python code for Part II of the book Causal Inference: What If, by Miguel Hernán and James Robins (book site):
Hernán MA, Robins JM (2020). Causal Inference: What If. Boca Raton: Chapman & Hall/CRC.
Required Python packages:
- numpy
- pandas
- statsmodels
- scipy
- matplotlib
- linearmodels
- tqdm
If you use the Anaconda distribution of Python, you'll have most of those packages already, and you'll only need to install
- linearmodels
- tqdm
The data can be obtained from the book site.
The notebooks all assume that the Excel version of the data has been saved in the same directory as the notebooks.
James Fiedler, with contributions from Petty PY Chen and Piyush Madan
Heyang Gong, 内容讲解部分。