Skip to content

Python code for part 2 of the book Causal Inference, by Miguel Hernán and James Robins

Notifications You must be signed in to change notification settings

shafiahmed/causal_inference_python_code

 
 

Repository files navigation

Causal Inference Python Code

This repo contains Python code for the book Causal Inference Part II, by Miguel Hernán and James Robins (book site).

The code here roughly corresponds to the Stata, R, or SAS programs found at the book site.

Python dependencies

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

Data

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.

Author

James Fiedler

About

Python code for part 2 of the book Causal Inference, by Miguel Hernán and James Robins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%