Difference-in-differences for mediation analysis using double machine learning
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Economics. The day in economics: theory, mechanisms and the evidence beneath them.
Ruth: We're looking at the paper: "Difference-in-differences for mediation analysis using double machine learning".
Paper summary: Ruth: To wrap up what we've covered about "Difference-in-differences for mediation analysis using double machine learning," this paper proposes a new difference-in-differences framework that can handle various types of treatments and mediators.
Warren: It claims this method allows researchers to identify the direct effect, the indirect effect via the mediator, and even joint effects of treatment and mediator simultaneously.
Iris: The core of their identification relies on a conditional parallel trends assumption applied either to mean potential outcomes across treatment states or to the distribution of mediators across treatment states depending on what specific causal parameter you are interested in.
Ruth: They propose specific estimators, called ATET estimators for repeated cross sections and panel data, which they claim let you control for covariates in a data-driven manner.
Warren: And they establish that these estimators have asymptotic normality under standard regularity conditions, which is important because it gives us confidence in the statistical properties of their estimates.
Iris: The paper also investigates the finite-sample performance of these proposed methods in a simulation study, and they showed favorable results for sample sizes in the order of several thousand observations.
Ruth: So, what this means is that they’ve put together a framework that is designed to be flexible enough for complex mediation analysis while still being statistically sound when applied to real data.
Warren: It suggests a way forward for analyzing dynamic treatment effects where both the treatment and the mediator are changing over time.
Conclusion: Ruth: So, thinking about "Difference-in-differences for mediation analysis using double machine learning," this work provides a flexible framework for causal mediation and dynamic treatment effect analysis.
Warren: It allows us to evaluate controlled direct effects, natural direct and indirect effects that run through mediators, and even joint treatment–mediator or dynamic treatment effects.
Iris: They successfully establish the asymptotic normality of their methods while demonstrating favorable finite-sample performance in a simulation study.
Ruth: Empirically, they showed that when applied to health care coverage data from the US National Longitudinal Survey of Youth one thousand nine hundred ninety-seven they could disentangle the direct effect of health care coverage on general health from the indirect effect through routine checkups <ref:2602.23877#pg1>.
Warren: The findings in that application point in a similar direction to other work, suggesting a consistent finding regarding short-term effects.
Iris: A limitation is that their identification relies on those conditional parallel trends assumptions, and they also flagged that the method doesn't necessarily capture every possible causal mechanism if those specific assumptions aren't met.
Ruth: So, the paper gives us a versatile tool for researchers looking to untangle these complex causal relationships in observational data.
University of Fribourg
econ.EM
Submitted: 2026-02-27
Updated: 2026-11-17
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 90/100
The gist: Difference-in-differences for mediation analysis using double machine learning proposes a new framework for difference-in-differences (DiD) with mediation to identify direct and indirect effects…
Key concepts
- Difference-in-Differences (DiD) for Mediation
- This is a method used to estimate the causal effect of an intervention by comparing changes in outcomes over time between a group that received the treatment and a comparable control group. When combined with mediation analysis, it helps determine if the effect flows through an intermediate variable (mediator).
- Double/Debiased Machine Learning (DML)
- This is a statistical framework used to perform causal inference while controlling for many covariates in data-driven ways. It uses doubly robust score functions to estimate treatment effects, making the results more reliable even when many control variables are involved.
- Conditional Parallel Trends Assumption
- This is a key assumption required for the DiD method to work. It assumes that, in the absence of a treatment or mediation effect, the average potential outcomes for both groups would have followed similar trends over time. This assumption is crucial for correctly isolating the causal impact.
- Dynamic Treatment Effects
- This refers to analyzing how a treatment affects an outcome not just at one point in time, but also how that effect changes over subsequent periods. The framework proposed allows researchers to estimate these more complex effects, such as the joint effect of treatment and mediator.
Terminology
Summary
Difference-in-differences for mediation analysis using double machine learning proposes a new framework for difference-in-differences (DiD) with mediation to identify direct and indirect effects, consistent with dynamic treatment effects The authors propose ATET estimators for repeated cross sections and panel data within the double/debiased machine learning framework, which allows for data-driven control of covariates They investigate the finite-sample performance of the proposed methods in a simulation study and illustrate their approach in an empirical application to the US National Longitudinal Survey of Youth
Framework and Identification Assumptions
The proposed framework accommodates possibly multivalued discrete or continuous treatments and mediators, allowing for the assessment of average direct and indirect treatment effects, as well as joint effects of the treatment and the mediator Identification relies on a conditional parallel trends assumption imposed on the mean potential outcome across treatment and mediator states, or additionally on the mean potential outcomes and potential mediator distributions across treatment states For identification of dynamic treatment effects, such as the joint effect of treatment and mediator, it relies on a conditional parallel trends assumption imposed on mean potential outcomes under no treatment and no mediation, or under specific nonzero treatment or mediator values A further class of causal parameters studied are natural direct and indirect effects, which are defined in terms of potential mediator values as functions of the treatment, rather than fixed mediator values
Estimation Methodology
The estimators build on the double/debiased machine learning (DML) framework of Chernozhukov et al. (2018) to control for covariates in a data-driven manner, which is particularly advantageous when the number of potential control variables is large relative to the sample size They employ doubly robust (DR) score functions, adapted to the DiD setting for estimating direct and indirect effects The estimators satisfy the Neyman (1959)-orthogonality condition, implying that they are relatively robust—i. p. 2 (2018) to control for covariates in a data-driven manner, which is
particularly advantageous when the number of potential control variables is large relative
to the sample size. To this end, we estimate the conditional mean outcome and treatment
models using machine learning methods and employ these nuisance estimates as plug-ins in
doubly robust (DR) score functions (e.Where the paper says it
Empirical Findings and Performance
An empirical application to the US National Longitudinal Survey of Youth 1997 estimated the direct effect of health care coverage on general health as well as the indirect effect operating through routine checkups The study found no statistically significant evidence of a short-term effect of health care coverage on general health among individuals who obtain coverage, either through routine checkups or through other causal mechanisms Simulation studies demonstrated favorable finite-sample performance for sample sizes in the order of several thousand observations
Conclusion and Contribution
The paper suggests a flexible difference-in-differences (DiD) framework for causal mediation and dynamic treatment effect analysis, allowing evaluation of controlled direct effects, natural direct and indirect effects operating through mediators, and joint treatment–mediator (or dynamic treatment) effects The authors establish asymptotic normality of their methods and demonstrate their favorable finite-sample performance in a simulation study They provide an empirical application using data from the National Longitudinal Survey of Youth 1997 to disentangle the direct effect of health care coverage on general health from the indirect effect operating through routine checkups The findings point in the same substantive direction as those of Farbmacher et al.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Double machine learning framework implementation for DiD estimators can be used to control for covariates in a data-driven manner, which is advantageous when the number of potential control variables is large relative to the sample size. This allows for flexible estimation of treatment and mediator models using machine learning methods as nuisance estimates.
-
The proposed ATET estimator satisfies Neyman orthogonality, making it particularly attractive for combination with machine learning methods for the estimation of the conditional mean outcomes and propensity scores, ensuring that they are first-order insensitive to estimation errors under suitable regularity conditions.
-
The framework can accommodate possibly multivalued discrete or continuous treatments and mediators, allowing for the assessment of average direct and indirect treatment effects, as well as joint effects of the treatment and mediator. This flexibility is achieved by replacing indicator functions with kernel weighting functions when treatments or mediators are continuous.
-
Identification of controlled direct effects is achieved under conditional parallel trends assumptions on mean potential outcomes across treatment-mediator states, which allows for data-adaptive adjustment of covariates using machine learning methods. This enables the framework to handle nonrandom treatments and mediators without requiring monotonicity assumptions.
-
The system can estimate natural direct and indirect effects by imposing additional parallel trend assumptions on mean potential outcomes or mediator distributions across treatment states. This decomposition capability disentangles the total ATET into causal mechanisms, such as the average indirect effect operating through a mediator M.
-
Panel data estimation simplifies to a DR expression where outcome differences are used instead of outcome levels, allowing for identification of ATE under Assumptions 1 to 4 and satisfying Neyman orthogonality for the total effect. This is achieved by identifying the average potential outcome as a function of the treatment and mediator states, such as E[Y1(d', M(d'))D = d, T = 1] = E[µd(0, X) + µd'(1, X) - µd'(0, X)] (A.25).
-
The system can estimate the counterfactual outcome E[Y1(d', M(d))D = d] using a DR expression that incorporates observed distributions of the mediator and treatment probabilities, such as equation (26), which satisfies Neyman orthogonality under Assumptions 1 to 4.
-
The system can estimate the ATE ∆(d, m, d', m') by identifying Ψd,m as the solution to a moment condition derived from a score function that is linear in Ψd,m and satisfies all of Chernozhukov et al. (2018) assumptions. This enables precise estimation of average treatment effects across treatment and mediator states.
Abstract
We propose a difference-in-differences (DiD) framework with mediation for possibly multivalued discrete or continuous treatments and mediators, aimed at identifying the direct effect of the treatment on the outcome (net of effects operating through the mediator), the indirect effect via the mediator, and the joint effects of treatment and mediator, consistent with the framework of dynamic treatment effects. Identification relies on a conditional parallel trends assumption imposed on the mean potential outcome across treatment and mediator states, or (depending on the causal parameter) additionally on the mean potential outcomes and potential mediator distributions across treatment states. We propose ATET estimators for repeated cross sections and panel data within the double/debiased machine learning framework, which allows for data-driven control of covariates, and we establish their asymptotic normality under standard regularity conditions. We investigate the finite-sample performance of the proposed methods in a simulation study and illustrate our approach in an empirical application to the US National Longitudinal Survey of Youth, estimating the direct effect of health care coverage on general health as well as the indirect effect operating through routine checkups.
Sources
- Difference in Differences with Time-Varying Covariates
- Difference-in-Differences Estimators for Treatments Continuously Distributed at Every Period
- Difference-in-Differences with Time-varying Continuous Treatments using Double/Debiased Machine Learning
- Continuous difference-in-differences with double/debiased machine learning
- Efficient Difference-in-Differences Estimation with High-Dimensional Common Trend Confounding
Related papers
- Stationarity with Occasionally Binding Constraints
- Backtesting High-Dimensional Expected Shortfall
- Higher-Order Neyman Orthogonality in Moment-Condition Models
- Online Bayesian Inference for a Dirichlet Process Mixture of Binary Logit Models
- Debiased Conditional Independence Tests for Causal Effects
- Sharp Testable Implications of Encouragement Designs