Module 27
Econometrics and Causal Inference
How do we distinguish a causal relationship from a statistical correlation and estimate what would happen if we changed a variable?
- lessons
- 28
- duration
- 49 h 45 min
- concepts
- 160
- available in English
- 28 / 28
- completed by you
0 of 28
Where it fits
Overview
This module unites two traditions that address causal questions: econometrics (OLS with projection asymptotics, non-spherical errors and GLS, endogeneity, instrumental variables, GMM, panel data, and structural models) and modern causal inference (potential outcomes, structural causal models, the backdoor criterion, do-calculus, and the ID algorithm). On that foundation, study estimators under ignorability (matching, propensity scores, AIPW, and double machine learning), quasi-experimental designs (LATE, staggered difference-in-differences, regression discontinuity, and synthetic control), counterfactuals and mediation, dynamic treatments, causal discovery, and causal learning with heterogeneous effects. Implement each estimator from scratch in NumPy, validate it in a simulated world with known truth, and compare it with statsmodels and classic public datasets.
Why it matters
Prediction is not intervention: deciding whether a product change, a security policy, a trading signal, or an intervention on an agent produces the intended effect requires identification, not just fit. This module provides the formal language to determine when the available data can answer a causal question and the tools to estimate the answer with honest uncertainty. For quantitative work it provides panel methods, IV, GMM, HAC, and event studies; for ML and research it covers double machine learning, causal forests, causal discovery, and foundations for out-of-distribution robustness and causal reasoning in LLMs.
Lessons 28
- 01Regression the econometric way: projection, FWL and asymptoticsReinterpret OLS without Gaussian errors as the best linear approximation to a conditional expectation, develop its large-sample sandwich variance under appropriate assumptions, use Frisch-Waugh-Lovell and distinguish descriptive from causal regression.
- 02Heteroskedasticity, autocorrelation and robust standard errorsConstruct HC0–HC3, cluster and Newey-West standard errors, study heteroskedasticity and serial-correlation tests, and use design-based clustering and wild cluster bootstrap with few groups.
- 03Generalized least squares: GLS, WLS and FGLSDevelop GLS, WLS, feasible GLS, AR(1) corrections and seemingly unrelated regressions, and weigh efficiency from modeling covariance against robust inference.
- 04Endogeneity: omitted variables, measurement error and simultaneityDerive omitted-variable, measurement-error and simultaneity bias; examine post-treatment controls and selection; and reason about bias and identification before estimation.
- 05Instrumental variables and two-stage least squaresStudy instrumental relevance, exogeneity and exclusion; derive Wald and 2SLS with robust variance; examine endogeneity tests and control functions; and replicate the Card college-proximity example.
- 06Generalized method of moments, overidentification and weak instrumentsUnify OLS, IV, 2SLS and likelihood through GMM; derive efficient weighting and Hansen's J, then study weak instruments, effective F and Anderson-Rubin inference.
- 07Panel data: fixed effects, random effects and dynamic panelsUse repeated observations to study fixed, first-difference and random effects, Hausman and Mundlak diagnostics, clustered panel inference, Nickell bias and dynamic-panel GMM.
- 08Structural models I: simultaneous equations and structural equation modelsStudy structural and reduced forms, order and rank identification, 2SLS and 3SLS, latent-variable structural equation models and the Lucas critique of policy extrapolation.
- 09Structural models II: discrete choice and sample selectionDerive discrete-choice models from random utility, calculate marginal effects, study substitution and IIA, and distinguish Tobit censoring from Heckman selection and truncation.
- 10Potential outcomes and randomized controlled trialsThe Neyman–Rubin model defines causal effects through potential outcomes. Derive estimands and selection bias, then study randomized assignment, Neyman inference, Lin adjustment, and stratified and cluster designs.
- 11Structural causal models and causal graphsStructural causal models encode mechanisms in causal DAGs. Derive the do operator and truncated factorization, distinguish intervention from conditioning, study colliders and the ladder of causation, and link graphs with potential outcomes using SWIGs.
- 12Identification by adjustment: the backdoor and frontdoor criteriaIdentification expresses an interventional quantity using the observational distribution. Derive backdoor and frontdoor criteria, find minimal and optimal adjustment sets, and classify good and bad controls.
- 13The do-calculus, the ID algorithm and completeness of identificationDo-calculus transforms interventions using three graphical rules. Derive backdoor and frontdoor, study semi-Markovian models and districts, implement ID, examine hedges, and discuss transportability.
- 14Adjustment under ignorability: standardization, matching, propensity scores and IPWWhen backdoor adjustment and overlap identify an effect, estimate it through standardization, matching, or propensity weighting. Study balance and overlap diagnostics and reproduce the LaLonde benchmark.
- 15Doubly robust estimation, influence functions and semiparametric efficiencyCombine outcome and treatment models through AIPW, derive double robustness and efficient influence functions, examine Hahn’s bound, and compare one-step estimation with TMLE under explicit assumptions.
- 16Double machine learning and control selection with the lassoDouble machine learning combines orthogonal scores and cross-fitting to control first-order nuisance errors. Derive partially linear and ATE scores, connect Robinson to FWL, and study double selection and learner diagnostics.
- 17Sensitivity analysis and partial identificationQuantify sensitivity to unmeasured confounding using partial-R² omitted-variable analysis, E-values, Rosenbaum matched-pair bounds, and Manski partial identification with monotonicity assumptions.
- 18Instrumental variables with heterogeneous effects: LATE and compliersWith heterogeneous effects, instrumental variables may identify a local average treatment effect for compliers. Study ITT, compliance types, complier characteristics, marginal treatment effects, and judge designs.
- 19Difference-in-differences and event studiesUnder parallel untreated trends, difference-in-differences identifies the treated effect. Derive the 2×2 regression, event studies, sensitivity to trend violations, and triple differences, and replicate Card and Krueger.
- 20Staggered difference-in-differences: the TWFE problem and modern estimatorsStaggered adoption with heterogeneous effects can make two-way fixed effects compare late-treated units with already-treated controls. Derive Goodman–Bacon and cell weights, then study cohort ATT, interaction-weighted event studies, and imputation.
- 21Regression discontinuity designsRegression discontinuity identifies local effects at a cutoff under continuity. Study sharp and fuzzy designs, local polynomial fits, bandwidth and robust bias correction, validity diagnostics, and election applications.
- 22Synthetic control and synthetic difference-in-differencesSynthetic control builds a convex combination of untreated donors to approximate one treated unit’s counterfactual. Study simplex optimization, factor-model justification, placebo inference, augmented control, and synthetic DiD.
- 23Counterfactuals, probabilities of causation and mediationStructural counterfactuals connect alternative worlds using abduction, action, and prediction. Study twin networks, identification limits, probabilities of causation, and natural and controlled mediation effects.
- 24Time-varying treatments: g-formula, marginal structural models and dynamic regimesTime-varying confounders affected by prior treatment require careful sequential methods. Derive the g-formula, stabilized marginal structural models, dynamic regimes, and offline policy evaluation.
- 25Causal discovery I: conditional independence, PC, FCI and GESConditional independences constrain causal graphs under Markov and faithfulness. Study equivalence classes, stable PC, latent-aware FCI, score-based GES, their limits, and Sachs signaling data.
- 26Causal discovery II: functional models, continuous optimization and invarianceFunctional restrictions can distinguish causal structures with identical independences. Study LiNGAM, additive noise, smooth acyclicity in NOTEARS, benchmark scale sensitivity, and invariant causal prediction.
- 27Heterogeneous effects and policy learning: meta-learners and causal forestsEstimate treatment-effect heterogeneity using S, T, X, R, and DR learners and honest causal forests. Evaluate ranking, calibration, and policy value without observing individual treatment effects.
- 28Frontier: deep causal learning, proximal inference and causality in LLMsExplore neural treatment-effect estimators, proximal inference with proxies, causal representations, and language-model causal reasoning. Assess assumptions, benchmark mechanisms, and limitations.
Module capstone
Causal laboratory: one question, one simulated world, and seven designs
Build a small library of your own, causalkit in NumPy and statsmodels, with a configurable SCM simulator, a backdoor-criterion checker for DAGs, and the module's estimators: OLS with robust errors, two-stage least squares, fixed effects, IPW, AIPW with cross-fitting, DML, Callaway and Sant'Anna difference-in-differences, local-linear regression discontinuity, and synthetic control. First validate it in simulated worlds with known truth, deliberately breaking each design by violating its assumptions (unmeasured confounding, exclusion, nonparallel trends, and threshold manipulation) and documenting the resulting bias. Then replicate the LaLonde and Dehejia-Wahba benchmark using public NSW data: compare the experimental effect with each method's observational estimates, report overlap and balance diagnostics and a Cinelli-Hazlett sensitivity analysis, and write a one-page report on what can and cannot be concluded.
Check what you already know
- Apply the Frisch-Waugh-Lovell theorem and derive the asymptotic distribution of OLS under E[xu] = 0
- Choose and calculate HC3, cluster-robust, or Newey-West standard errors according to the dependence structure
- Derive omitted-variable bias and its sign in a concrete example
- Estimate by two-stage least squares, interpret the first stage, and detect weak instruments
- Estimate fixed and random effects in a panel and choose between them using the Hausman test or the Mundlak approach
- Express ATE, ATT, and selection bias using potential outcomes and estimate a randomized trial with Neyman variance
- Find a valid adjustment set using the backdoor criterion in a DAG with colliders
- Apply the three rules of do-calculus to derive the frontdoor formula
- Implement IPW and AIPW with an estimated propensity score and diagnose overlap
- Estimate a 2×2 difference-in-differences design and explain why TWFE fails with staggered adoption and heterogeneous effects
- Estimate a regression discontinuity effect using a local polynomial and bias correction
- Run the PC algorithm and interpret the resulting CPDAG
References
- Mostly Harmless Econometrics: An Empiricist's Companion
- Econometric Analysis of Cross Section and Panel Data
- Econometrics
- Causality: Models, Reasoning, and Inference
- Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction
- Causal Inference: What If
- Elements of Causal Inference: Foundations and Learning Algorithms
- A First Course in Causal Inference