A guided reading path
Causal inference: from association to a credible comparison
To ask what a policy changed, you need a credible account of what would have happened without it. Start with that comparison, then examine the assumptions of each design.
01 · Understand the question
Build the foundations
Read in this order, or open the question you are working on.
Correlation vs causation in economics: from confounding to natural experiments
Why a regression coefficient is not automatically a causal effect, and how economists use experiments, instruments and natural experiments to find one.
What is econometric analysis? From question to evidence
Econometric analysis connects an economic question to data, a model and defensible conclusions. Follow a practical workflow with a policy-evaluation example.
02 · Examine the assumptions
Explore methods when you need them
A clear description may already answer your question. If modelling is useful, these references explain the estimator, supported options, a runnable example and limitations. Choose one for your question and assumptions.
-
Linear models and IV
Instrumental variables in Python: 2SLS, LIML and GMM
Estimate instrumental-variables regressions in Python with 2SLS, LIML or GMM, read the weak-instrument and overidentification tests, and map them to ivregress.
-
Causal inference
Difference-in-differences in Python: didregress and parallel trends
Estimate a two-way fixed-effects difference-in-differences model in Python, cluster by group, test parallel trends and map it to Stata's didregress.
-
Causal inference
Staggered difference-in-differences in Python: Callaway–Sant'Anna csdid
Estimate Callaway–Sant'Anna group-time ATTs for staggered adoption in Python, aggregate them by event time and see why a two-way fixed-effects DiD can mislead.
-
Causal inference
Regression discontinuity in Python: rdrobust with robust bias correction
Estimate sharp and fuzzy regression discontinuity designs in Python with local polynomials, optimal bandwidths and robust bias-corrected intervals.
-
Causal inference
Treatment effects in Python: propensity score matching, IPW and AIPW
Estimate ATE and ATET in Python by regression adjustment, inverse probability weighting, doubly robust AIPW or matching, and map each to Stata's teffects.
-
Causal inference
Synthetic control in Python: donor weights, placebos and synthetic DiD
Estimate a synthetic control for one treated unit in Python, read its donor weights and placebo p-value, and compare it with synthetic DiD.
-
Causal inference
Event study regression in Python: leads, lags and pre-trend tests
Fit a two-way fixed-effects event study in Python, choose the leads, lags and reference period, test pre-trends and tabulate the dynamic effects.
03 · Work through the evidence
Try a worked lab
These exercises use synthetic teaching data. The full handout, Python analysis and available resources are linked on each lab page.
Worked lab
Evaluate a randomized programme
Start with assignment, comparison groups and what the treatment estimate represents.
Worked lab
Compare changes across groups
Work through difference-in-differences and its identifying assumption.
Worked lab
Study a treatment threshold
See why a discontinuity design answers a local causal question.
Try it on your own data
OpenEconometrics is free and open source under Apache 2.0. Install the Python library or download the desktop alpha.
pip install openecon