Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NotificationsYou must be signed in to change notification settings

jrfiedler/causal_inference_python_code

Repository files navigation

This repo contains Python code for Part II of the bookCausal 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.

This Python version roughly corresponds to the Stata, R, or SAS programs found at the book site, and was also translated into Julia,here.

The code in this repo has been checked against the 30 March 2021 version of the book.

Python dependencies

Required Python packages:

  • numpy
  • pandas
  • statsmodels
  • scipy
  • matplotlib
  • linearmodels
  • tqdm

If you use theAnaconda 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 thebook 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, with contributions fromPetty PY Chen andPiyush Madan

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp