Skip to main content

9. Causal Inference and Modern Policy Evaluation

Verified Environments & Platforms:EcoDataEcoLabFincoVietLOD

Chapter 9. Causal Inference and Modern Policy Evaluation provides step-by-step How-To implementation guides for 37 econometric model lessons organized across 5 methodological parts from Section 9.1.1 to 9.5.15. Every guide is synchronized with the full academic lecture at VietLOD Chapter 9 and supports automated cloud execution on EcoLab.

Video Tutorial: How-To Guide for Chapter 9: Causal Inference and Modern Policy Evaluation in Stata 18, R 4.x, and Python 3.11+

9.1. Central Research Question and Core Mathematical Specification​

  • Central Research Question: How to identify Average Treatment Effects using matching, staggered Difference-in-Differences, regression discontinuity, synthetic controls, and Double Machine Learning?
  • Chapter Architecture: Encompasses 5 specialized methodological parts from 9.1 to 9.5 and 37 empirical model lessons validated on Vietnamese datasets from EcoData and Finco.

Core structural equation for Chapter 9:

ATT(g,t)=E[Yit(g)−Yit(∞)∣Gig=1]\text{ATT}(g, t) = \text{E}[Y_{it}(g) - Y_{it}(\infty) \mid G_{ig} = 1]
Methodological Scope Boundary:Conventional Two-Way Fixed Effects Difference-in-Differences yields biased estimates with negative weights when treatment timing is staggered and treatment effects are heterogeneous over time. Mandatory diagnostics for this chapter include: Joint Pre-Trend Wald Test, Goodman-Bacon Negative Weight Diagnostic, Rambachan–Roth HonestDiD Breakdown M, Cattaneo rddensity Manipulation Test, SMD Balance Check.

9.2. Explore the 5 Methodological Parts in Chapter 9​

4 Lessons
9.1. Propensity Matching and Covariate Balancing

Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Propensity Matching and Covariate Balancing estimators.

Explore Guide
5 Lessons
9.2. Canonical Difference-in-Differences and Event Study

Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Canonical Difference-in-Differences and Event Study estimators.

Explore Guide
7 Lessons
9.3. Regression Discontinuity, Kink, Bunching and Marginal Effects

Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Regression Discontinuity, Kink, Bunching and Marginal Effects estimators.

Explore Guide
6 Lessons
9.4. Inverse Probability Weighting, Synthetic Control and Causal ML

Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Inverse Probability Weighting, Synthetic Control and Causal ML estimators.

Explore Guide
15 Lessons
9.5. Modern Heterogeneity-Robust Staggered Difference-in-Differences

Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Modern Heterogeneity-Robust Staggered Difference-in-Differences estimators.

Explore Guide

9.3. Four-Step Workflow for Selecting and Executing Models in Chapter 9​

Step 1. Select the Appropriate Methodological Part From 9.1 to 9.5

Match your economic hypothesis and sample structure against the identification requirements in Chapter 9 to select the appropriate A.B.C model lesson.

Step 2. Prepare Standardized Datasets From EcoData or Finco

Download the standardized .csv practice file for your target estimator from /src/ecoaz/data/ or extract live empirical series from EcoData and Finco.

Step 3. Estimate Parameters and Run Diagnostics in Stata 18, R 4.x, and Python 3.11+

Execute the tri-engine scripts provided in each model guide and verify the mandatory post-estimation diagnostics: Joint Pre-Trend Wald Test, Goodman-Bacon Negative Weight Diagnostic, Rambachan–Roth HonestDiD Breakdown M, Cattaneo rddensity Manipulation Test, SMD Balance Check.

Step 4. Verify Three-Software Convergence and Export Publication Tables on EcoLab

Confirm numerical convergence across Stata, R, and Python using the three-panel empirical figure and generate journal-grade tables on EcoLab.

9.4. Complete Directory of 37 Econometric Model Lessons in Chapter 9​

SectionEconometric Model Lesson TitleEstimator KeyLevelSoftware Packages Stata · R · PythonSupport
9.1.19.1.1. Propensity Score Matching — PSMpropensity_score_matchingL1base Stata · MatchIt / stats · statsmodels / scikit-learnAvailable
9.1.29.1.2. Hainmueller Entropy Balancingentropy_balancingL2Stata ebalance · ebal / stats · scipy / statsmodelsAvailable
9.2.19.2.1. Two-Way Fixed Effects Difference-in-Differencestwfe_didL1base Stata · fixest / plm · linearmodelsAvailable
9.2.29.2.2. Dynamic Leads-and-Lags Event-Study DIDevent_study_didL2Stata reghdfe / xtreg · fixest · linearmodels / statsmodelsAvailable
9.2.39.2.3. Callaway-Sant'Anna Group-Time Staggered DIDcallaway_santanna_didL3Stata csdid · did · csdid / statsmodelsAvailable
9.3.19.3.1. Sharp Regression Discontinuity Designsharp_rddL1Stata rdrobust · rdrobust / stats · rdrobust / statsmodelsAvailable
9.3.29.3.2. Fuzzy Regression Discontinuity Designfuzzy_rddL2Stata rdrobust · rdrobust / AER · rdrobust / linearmodelsAvailable
9.3.39.3.3. Bias-Corrected Robust Local-Polynomial RDDrdrobust_sharp_fuzzyL3rdrobust · rdrobust · rdrobustAvailable
9.3.49.3.4. Sharp and Fuzzy Regression Kink Designregression_kink_rkdL4rdrobust · rdrobust · rdrobustAvailable
9.3.59.3.5. Saez-Kleven Counterfactual Density Bunching Estimatorbunching_estimatorL4bunchit · bunching · statsmodelsAvailable
9.3.69.3.6. Heckman-Vytlacil Marginal Treatment Effects and Local IVmarginal_treatment_effectsL4mtefe · ivmte · statsmodelsAvailable
9.4.19.4.1. Inverse Probability Weighting — IPWipwL1base Stata · WeightIt / stats · statsmodelsAvailable
9.4.29.4.2. Doubly Robust Augmented IPW — AIPWaipwL2base Stata · AIPW / stats · doubleml / statsmodelsAvailable
9.4.39.4.3. Abadie-Diamond-Hainmueller Synthetic Controlsynthetic_controlL2Stata synth · Synth · pysyncon / scipyAvailable
9.4.49.4.4. Ridge-Augmented Synthetic Control Methodaugmented_synthetic_controlL3synth / fect · Synth / fect · pysynconAvailable
9.4.59.4.5. Chernozhukov Double Debiased Machine Learning — DMLdouble_mlL3Stata 18 lasso · DoubleML / glmnet · doubleml / scikit-learnAvailable
9.4.69.4.6. Athey-Wager Heterogeneous Causal Forestcausal_forestL4Stata Python/R bridge · grf / randomForest · econml / scikit-learnAvailable
9.5.19.5.1. Goodman-Bacon Staggered TWFE Weight Decompositionbacon_decompositionL3bacondecomp · bacondecomp · linearmodelsAvailable
9.5.29.5.2. Sun-Abraham Interaction-Weighted Event-Study DIDsun_abraham_didL3eventstudyinteract · fixest · pyfixestAvailable
9.5.39.5.3. Borusyak-Jaravel-Spiess Counterfactual Imputation DIDborusyak_imputation_didL3did_imputation · did2s · pyfixestAvailable
9.5.49.5.4. De Chaisemartin Dynamic Switching Treatment DIDdechaisemartin_didL4did_multiplegt_dyn · DIDmultiplegtDYN · linearmodelsAvailable
9.5.59.5.5. Wooldridge Extended Two-Way Mundlak Fixed-Effects DIDwooldridge_etwfeL3Stata 18 xthdidregress / jwdid · etwfe · pyfixestAvailable
9.5.69.5.6. Clean-Control Local Projections Difference-in-Differenceslp_didL4lpdid · fixest · pyfixestAvailable
9.5.79.5.7. Rambachan-Roth HonestDiD Parallel-Trends Sensitivityhonest_did_sensitivityL3honestdid · HonestDiD · scipy / statsmodelsAvailable
9.5.89.5.8. Synthetic Difference-in-Differencessynthetic_didL3sdid · synthdid / fect · pysynconAvailable

| 9.1.3 | 9.1.3. Generalized Propensity Score Continuous Treatment Dose Response Hirano Imbens | generalized_propensity_score_gps | L4 | doseresponse · CausalGPS · statsmodels | Available | | 9.1.4 | 9.1.4. Rosenbaum Sensitivity Bounds for Hidden Unobserved Confounding | rosenbaum_sensitivity_bounds | L4 | rbounds · rbounds · scipy | Available | | 9.2.4 | 9.2.4. Difference in Difference in Differences Gruber Olden Moen | triple_difference_ddd | L4 | xtreg · fixest · statsmodels | Available | | 9.2.5 | 9.2.5. Changes in Changes Nonlinear Counterfactual Distribution Athey Imbens | changes_in_changes_athey_imbens | L4 | xtreg · qte · scipy | Available | | 9.3.7 | 9.3.7. Quantile Regression Discontinuity Design Frandsen Frolich Melly | quantile_rdd_frandsen | L4 | sqreg · quantreg · statsmodels | Available | | 9.5.9 | 9.5.9. Targeted Maximum Likelihood Estimation van der Laan Rubin | tmle_targeted_mle | L4 | teffects · tmle · statsmodels | Available | | 9.5.10 | 9.5.10. Potential Outcomes Causal Mediation ACME and ADE Imai Keele Yamamoto | causal_mediation_imai | L4 | mediate · mediation · statsmodels | Available | | 9.5.11 | 9.5.11. Empirical Welfare Maximization and Optimal Policy Tree Kitagawa Tetenov Athey Wager | optimal_policy_tree_kitagawa | L4 | teffects · policytree · statsmodels | Available | | 9.5.12 | 9.5.12. Heckman Vytlacil Local IV Marginal Treatment Effects | marginal_treatment_effects_mte | L4 | mtefe · ivmte · statsmodels | Available | | 9.5.13 | 9.5.13. Lee Sharp Nonparametric Sample Selection Treatment Effect Bounds | lee_trimming_bounds | L4 | leebounds · leebounds · scipy | Available | | 9.5.14 | 9.5.14. DiNardo Fortin Lemieux Counterfactual Reweighting and Changes in Changes | changes_in_quantiles_dfl_dinardo | L4 | dfl · qte · statsmodels | Available | | 9.5.15 | 9.5.15. Athey Imbens Nuclear Norm Matrix Completion Causal Panel Estimator | matrix_completion_panel_athey | L4 | fect · fect · numpy | Available |

9.5. Key Academic References​

  • Callaway, B, & Sant'Anna, P. H. C.(2021). Difference-in-differences with multiple time periods. Journal of Econometrics, 225, số 2, 200–230.
  • Sun, & Abraham(2021). Econometric specification, identification, and asymptotic inference.
  • Borusyak, Jaravel, & Spiess(2024). Econometric specification, identification, and asymptotic inference.
  • Arkhangelsky et al.(2021). Econometric specification, identification, and asymptotic inference.
  • Calonico, S, Cattaneo, M. D, & Titiunik, R.(2014). Robust nonparametric confidence intervals for regression-discontinuity designs. Econometrica, 82, số 6, 2295–2326.
  • Chernozhukov, V, Chetverikov, D, Demirer, M, Duflo, E, Hansen, C, Newey, W, & Robins, J.(2018). Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21, số 1, C1–C68.
  • Cerulli, G.(2022). Econometric Evaluation of Socio-Economic Programs: Theory and Applications, 2nd ed, Chương 1–6: Matching, IPW, DID, RDD and Synthetic Control. Springer.
  • Cameron, A. C, & Trivedi, P. K.(2022). Microeconometrics Using Stata, 2nd ed, Vol. 2, Chương 23–25 & 29: Treatment Effects, DID, RDD and Causal ML. Stata Press.
  • Wooldridge, J. M.(2010). Econometric Analysis of Cross Section and Panel Data, 2nd ed, Chương 21: Estimating Average Treatment Effects. MIT Press.
  • Stock, J. H, & Watson, M. W.(2020). Introduction to Econometrics, 4th ed, Chương 13: Experiments and Quasi-Experiments. Pearson.