term estimate std.error statistic p.value conf.low conf.high df
1 plow -2.1 2.1 -1 0.318 -6.25 2.04 145
outcome
1 women_politics
PS 813 - Causal Inference
April 20, 2026
\[ \require{cancel} \]
The Controlled Direct Effect considers a difference between intervening on treatment vs. control also fixing the mediator to a particular quantity
\[\text{CDE}(m) = Y_i(1, m) - Y_i(0, m)\]
How to interpret
The Natural Indirect Effect captures the change in the outcome if treatment is set fixed to \(d\), but the mediator is set to the level it would take under treatment vs. the level it would take under control.
\[\text{NIE}(d) = Y_i(d, M_i(1)) - Y_i(d, M_i(0))\]
How to interpret
Vanderweele (2014) provides an interpretation in terms of actually observable potential outcomes
\[\text{NIE}(d) = (Y_i(d, 1) - Y_i(d, 0)) \times (M_i(1) - M_i(0))\]
The Natural Direct Effect differs slightly from the CDE since it imagines fixing \(d\) to \(M_i(d)\) as opposed to \(m\)
\[\text{NDE}(d) = Y_i(1, M_i(d)) - Y_i(0, M_i(d))\]
How to interpret:
With a binary mediator, Vanderweele (2014) provides a decomposition for in terms of a mixture of the two \(CDE\)s
\[\text{NDE}(d) = (Y_i(1, 0) - Y_i(0,0)) + (Y_i(1,1) - Y_i(0,1) - Y_i(1,0) + Y_i(0,0)) (M_i(d))\]
Under constant CDEs, the average controlled direct effect is the average natural direct effect
The goal of mediation analysis is typically to decompose the total effect of a treatment into components attributable and not attributable to the mediator.
The classic 2-way decomposition from Robins and Greenland (1992):
\[Y_i(1) - Y_i(0) = \text{NDE}_i(d) + \text{NIE}_i(1-d)\]
Vanderweele (2013) clarifies that \(\text{NDE}(1)\) or \(\text{NIE}(1)\) can be thought of as a “pure” direct/indirect effect plus an interaction. This leads to a 3-way decomposition (for a binary mediator)
\[Y_i(1) - Y_i(0) = \text{NDE}_i(0) + \text{NIE}_i(0) + (Y_i(1,1) - Y_i(0,1) - Y_i(1,0) + Y_i(0,0))(M_i(1) - M_i(0))\]
Writing the \(NDE_i(0)\) in terms of the controlled direct effect fixing \(M_i = 0\) leads to Vanderweele (2014)’s 4-way decomposition
\[\begin{align*} Y_i(1) - Y_i(0) &= \text{CDE}_i(0) + \underbrace{(Y_i(1,1) - Y_i(0,1) - Y_i(1,0) + Y_i(0,0)) (M_i(0))}_{\text{reference interaction}} + \\ & \underbrace{(Y_i(1,1) - Y_i(0,1) - Y_i(1,0) + Y_i(0,0))(M_i(1) - M_i(0))}_{\text{mediated interaction}} + \text{NIE}_i(0)\end{align*}\]
Estimand: Average Controlled Direct Effect fixing \(M_i = m\)
\[\text{ACDE}(m) = E[Y_i(1, m) - Y_i(0, m)]\]
Identifying assumption: Sequential ignorability
\[\begin{align*}\{Y_i(d, m), M_i(d)\} &{\perp \! \! \! \perp} D_i | X_i = x\\ Y_i(d, m) &{\perp \! \! \! \perp} M_i | D_i = d, X_i = x, L_i = l \end{align*}\]
Treatment is as-good-as-randomly assigned given pre-treatment covariates
Mediator is as-good-as-randomly assigned given pre-treatment covariates, post-treatment covariates and treatment.
Can’t just condition on \(L_i\) (affected by treatment) but can’t not adjust for it (confounder of \(M\)).
Solution: Robins’ g-formula
\[E[Y_i(d, m)] = \sum_{x, l} E[Y_i | D_i = d, M_i = m, L_i = l, X_i = x] \times P(L_i = l | D_i = d, X_i = x) \times P(X_i = x)\]
Challenges in direct estimation:
Robins (1999) developed a technique to estimate the average treatment effect of any joint intervention on multiple variables
First, define a “marginal structural model” for the mean potential outcomes under a particular treatment “history”
\[E[Y_i(d,m)] = \alpha_0 + \alpha_1 d + \alpha_2 m + \alpha_3 dm\]
With long treatment histories need to make some assumptions (e.g. a blip + cumulative effect), but here straightforward to use a fully-saturated MSM.
Under sequential ignorability, we can get consistent estimates of the parameters via a regression with inverse-propensity of treatment weights.
For a unit with treatment \(D_i = d\) and mediator \(M_i = m\), we construct the IP weight:
\[\text{SW}_i = \frac{Pr(D_i = d)}{Pr(D_i = d|X_i = x)} \times \frac{Pr(M_i = m | D_i = d)}{Pr(M_i = m | D_i = d, X_i = x, L_i = l)}\]
Identifying the average natural direct and indirect effects is a much greater challenge.
Classic approaches from sociology relied on structural equations for the outcome and the mediator (Baron and Kenny)
\[\begin{align*} Y_i &= \alpha_1 + \tau_1 D_i + + X_i^{\prime}\beta_1 + \epsilon_{i1}\\ M_i &= \alpha_2 + \tau_2 D_i + X_i^{\prime}\beta_2 + \epsilon_{i2}\\ Y_i &= \alpha_3 + \tau_3 D_i + \gamma M_i + X_i^{\prime}\beta_3 + \epsilon_{i3}\\ \end{align*}\]
Under what conditions can we get valid natural direct and indirect effects? Imai, Keele and Yamamoto (2010) show that we need a stronger version of sequential ignorability that rules out any intermediate confounders \(L_i\)
\[\begin{align*}\{Y_i(d, m), M_i(d)\} &{\perp \! \! \! \perp} D_i | X_i = x\\ Y_i(d, m) &{\perp \! \! \! \perp} M_i | D_i = d, X_i = x \end{align*}\]
For the SEM setting, we also need a no-interaction assumption: \(\text{ANDE}(0) = \text{ANDE}(1)\) and the usual linearity assumptions.
\[\begin{align*} Y_i &= \alpha_1 + \tau_1 D_i + + X_i^{\prime}\beta_1 + \epsilon_{i1}\\ M_i &= \alpha_2 + \tau_2 D_i + X_i^{\prime}\beta_2 + \epsilon_{i2}\\ Y_i &= \alpha_3 + \tau_3 D_i + \gamma M_i + X_i^{\prime}\beta_3 + \epsilon_{i3}\\ \end{align*}\]
Run the regression of \(Y_i\) on everything
\[Y_i = \gamma_0 + \gamma_1 D_i + \gamma_2 M_i + X_i^{\prime}\gamma_3 + L_i^{\prime} \gamma_4 + \epsilon_i\]
Take \(\hat{\gamma_2}\) as the effect of the mediator on the outcome and create a “blipped-down” outcome that removes the effect of the mediator on \(Y_i\): \(\tilde{Y_i} = Y_i - \hat{\gamma}_2M_i\)
Regress \(\tilde{Y_i}\) on \(D_i\) and \(X_i\) only
\[\tilde{Y_i} = \beta_0 + \beta_1 D_i + X_i^{\prime}\beta_3 + \epsilon_i\]
\(\hat{\beta_1}\) is our estimate of the \(\text{CDE}(0)\)
term estimate std.error statistic p.value conf.low conf.high df
1 plow -2.1 2.1 -1 0.318 -6.25 2.04 145
outcome
1 women_politics
DirectEffects implementation of sequential-G specifies a formula as y ~ d + x | l | mform_main <- women_politics ~ plow + agricultural_suitability + tropical_climate +
large_animals + political_hierarchies + economic_complexity + rugged |
years_civil_conflict + years_interstate_conflict + oil_pc + european_descent +
communist_dummy + polity2_2000 + serv_va_gdp2000 |
centered_ln_inc + centered_ln_incsq
direct <- sequential_g(form_main, data = ploughs)
t test of coefficients:
Estimate Std. Err. t value Pr(>|t|)
(Intercept) 12.185 3.644 3.34 0.0011 **
plow -4.839 2.345 -2.06 0.0413 *
agricultural_suitability 4.574 3.105 1.47 0.1435
tropical_climate -2.189 2.105 -1.04 0.3006
large_animals -1.330 3.400 -0.39 0.6964
political_hierarchies 0.496 1.091 0.45 0.6503
economic_complexity -0.105 0.430 -0.24 0.8070
rugged -0.309 0.478 -0.65 0.5199
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
So long as the limitations of this exploratory mode of investigation are clear, scientific investigation can proceed in an orderly manner. The problem is that so long as social scientists operate with a mistaken understanding of what can be expected from a mediation analysis, they will flit from one topic to another without an appropriate sense of the limits of what has been learned along the way. When critics make pious declarations about the importance of opening the black box, one must recognize that in social sciences black boxes are rarely if ever opened. Sometimes they are declared open by researchers who are too sanguine about the power of their lock-picking skills. Such declarations give the impression that the work is easy or already complete, which ironically slows the painstaking process by which real progress is made
(Green, Ha and Bullock, 2010)
PS 813 - University of Wisconsin - Madison