Inference Lab

Applied causal inference for the spatial social sciences

Author

Dr. Ian Helfrich

Published

May 2026

A working teaching site · open · CC-BY-SA 4.0

Inference Lab

Applied causal inference for the spatial social sciences. Fifteen chapters on the methods I actually use, with R and Stata code side by side: DiD (and the TWFE crisis), RDD, IV, synthetic control, quantile regression, networks, intermediary pass-through, and optimal transport. Plus live, browser-side interactive demos of the headline methods.

Dr. Ian Helfrich · ~60,000 words · CC-BY-SA 4.0

Stylized illustration combining a causal DAG, a parallel-trends comparison, a small network cluster, and an RDD-style histogram jump.

What this is

A working teaching site in the spirit of QuantEcon, but for applied causal inference with a deliberate spatial / network / intermediary focus that the standard econometrics curriculum skims past. You do not need to read these in order. If you have to estimate a clean DiD by Friday or defend an RDD bandwidth choice to a discussant, jump to that chapter.

Every chapter follows the same shape:

  1. Why this matters for an applied researcher in development, finance, or program evaluation
  2. The intuition, then the math (in clean KaTeX, when it earns its keep)
  3. A worked example with both R and Stata code, runnable side by side
  4. Common traps (where students lose points; where referees attack)
  5. A reporting checklist that makes the result defensible
  6. References to the methodological canon plus applied papers

The lecture series

1 Orientation

What this work actually is, and how the tools relate. Read these first if you’re new to applied causal inference.

2 Foundations

The 90% of regressions you’ll run, done correctly. Cluster at the right level or get desk-rejected.

3 Quasi-experimental designs

The workhorse identification toolkit. Plus the TWFE crisis you have to know cold.

4 Distribution & heterogeneity

When the mean is not the policy question. Quantile regression, causal ML, and CATE estimation for who-responded analyses.

5 Networks, geography, structure

The chapters most applied-econometrics curricula skip. Manski reflection, intermediary fixed effects, effective distance.

6 Design & writing

Pre-analysis plans, power, attrition. Plus the 50-paper reading list every applied researcher should have triaged.

7 Practice

32 problems across 8 blocks, Easy to Twist. The Twist problems are where referees attack.

8 Fieldwork notes

Practical playbooks for the work that happens off-screen. Pre-departure prep, stakeholder maps, interview tactics.

The compact reading order

If you’ve never done causal inference before, read in this order:

  1. Chapter 02 to set up your tools
  2. Chapter 03 to write your first FE regression cleanly
  3. Chapter 04 to learn DiD and the TWFE crisis
  4. Chapter 05 to learn RDD (the cleanest causal design in practice)
  5. Chapter 11 to triage 5 to 10 papers in your area before going further
  6. Then whichever of 06, 07, 08, 09, 13, 14, 15 matches your project

If you already know DiD, RDD, and IV cold, the differentiating chapters are 13 (networks), 14 (intermediary pass-through), and 15 (optimal transport / effective distance). Those three pull together themes most applied curricula scatter across spatial econometrics, network economics, and IO of financial intermediaries.

How this was built

Quarto book. Math via KaTeX. Code blocks copy-to-clipboard. Theme is hand-built SCSS using Source Serif 4, Inter, and JetBrains Mono. Source on GitHub; issues and pull requests welcome.

Sister sites: Macro Prep (intermediate macro with live FRED data) and the hub (research, datasets, writing, teaching).