Ross ROSS = Recommend OSS · open-source software intelligence for agents

jrfiedler/causal_inference_python_code resource

Python code for part 2 of the book Causal Inference: What If, by Miguel Hernán and James Robins observed · 2026-08-28

github.com/jrfiedler/causal_inference_python_code · Jupyter Notebook observed · 2026-08-28

Health v2 · maintenance only

32/100

  • Activity 0
  • Release rhythm 35
  • Longevity 100

Flags: no_releases no_license

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 3132
  • days_rel: n/a
  • days_push: 1699
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1354 stars · 413 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A collection of Jupyter notebooks implementing the Python code for Part II of the book 'Causal Inference: What If' by Hernán and Robins. It reproduces the book's Stata, R, and SAS analyses using numpy, pandas, statsmodels, and related libraries.

Use cases

  • learn causal inference from the Hernán and Robins book with Python
  • replicate book examples like g-formulas and IP weighting in Python
  • find Python equivalents of the book's Stata, R, and SAS programs
  • study marginal structural models and standardization hands-on
  • teach a causal inference course with worked code examples

When to choose

  • you are working through 'Causal Inference: What If' and want Python implementations
  • you want reference code for causal inference methods like IP weighting and g-computation
  • you prefer notebooks that mirror the book's chapter-by-chapter analyses

When to avoid

  • you need a production causal inference library with APIs and tests
  • you need Part I or Part III of the book, which are not covered
  • you require a maintained, licensed package for a software project

Facets

learning-resource · maturity maintenance

data-science machine-learning data-science education tutorials python causal-inference jupyter-notebooks statistics epidemiology book-companion

1 source

Member repositories

RepositoryRoleHealth v2
jrfiedler/causal_inference_python_codemain32

For agents

markdown · JSON · MCP: product_card(name="jrfiedler/causal_inference_python_code")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem