Why Define Effects Through Mediator Distributions?
A mediation question asks how outcomes might change if treatment changed while the mediator were handled in a specified way. One option is to assign each person the mediator value that the same person would have had under another treatment. Interventional effects use a different construction: they draw a mediator value from a population distribution associated with a treatment level. This makes the intervention explicitly stochastic and gives a clear population-level meaning to the resulting contrasts.
This tutorial focuses on marginal mediator distributions: the draw is from the target population’s mediator distribution under treatment 0 or treatment 1, without conditioning that distribution on baseline covariates. Different choices of mediator intervention define different estimands, so the reference distribution must be named when reporting an effect.
Because \(Y\) is binary, its expectation is a risk. Thus \(\psi(t,a)\) is the population risk under a specified treatment and mediator intervention. The first argument \(t\) says which treatment is set for the outcome response; the second argument \(a\) identifies the treatment level whose mediator distribution supplies the random draw. These arguments need not be equal.
Write \(q_a(m)=P(M(a)=m)\) for the exposure-specific mediator distribution and \(r_{tm}=E[Y(t,m)]\) for the mean outcome under treatment \(t\) and mediator value \(m\). For a discrete mediator, the stochastic-intervention risk is
In words, multiply the outcome risk for each mediator value by the probability that the intervention draws that value, then add across mediator values. For binary \(M\), if \(q_a=P(M(a)=1)\), this becomes
Interventional Direct and Indirect Effects
An interventional direct effect compares treatment levels while holding the stochastic mediator intervention fixed. An interventional indirect effect compares mediator-distribution interventions while holding the treatment level fixed. On the risk-difference scale, define
Here \(a^*\) is the chosen reference level for the mediator distribution, and \(t\) is the treatment level at which the indirect contrast is evaluated. For example, \(\operatorname{IDE}(0)\) compares treatment 1 with treatment 0 while drawing the mediator from its treatment-0 distribution. Meanwhile, \(\operatorname{IIE}(1)\) compares draws from the treatment-1 and treatment-0 mediator distributions while holding treatment at 1.
Each contrast is a difference in outcome risks, reported in percentage points when risks are converted to percentages. A positive direct effect means that the risk is higher under treatment 1 than treatment 0 with the stated mediator intervention held fixed. A positive indirect effect means that replacing the treatment-0 mediator distribution with the treatment-1 distribution raises risk at the stated treatment level. Neither interpretation is an association claim: these are contrasts between specified causal interventions.
Calculating the Stochastic-Intervention Risk
The weighted-average formula follows from conditioning on the mediator value drawn by the intervention. Since \(G_a\) takes value \(m\) with probability \(q_a(m)\), the law of total expectation gives
The middle equality uses the intervention’s construction: when the draw is \(m\), the outcome is the counterfactual outcome under treatment \(t\) and mediator value \(m\). For binary \(Y\), each \(r_{tm}\) is a probability between 0 and 1. The formula therefore averages valid risks using nonnegative weights that sum to 1.
Worked Example: Direct and Indirect Risk Differences
Suppose a hypothetical population has binary mediator \(M\). The stipulated probabilities of \(M=1\) under treatment 0 and treatment 1 are \(q_0=0.25\) and \(q_1=0.60\). Suppose the outcome risks under fixed treatment and mediator values are \(r_{00}=0.10\), \(r_{01}=0.30\), \(r_{10}=0.20\), and \(r_{11}=0.50\). Calculate the four stochastic-intervention risks, the direct effect using the treatment-0 mediator distribution, and the indirect effect at treatment 1.
For a binary mediator, \(\psi(t,a)=r_{t0}(1-q_a)+r_{t1}q_a\). Under treatment 0 with the treatment-0 mediator distribution,
Under treatment 0 with the treatment-1 mediator distribution,
For treatment 1, the corresponding risks are
The direct effect with the mediator drawn from its treatment-0 distribution is \(\operatorname{IDE}(0)=0.275-0.150=0.125\), a 12.5-percentage-point increase in outcome risk under treatment 1 versus treatment 0 with that stochastic mediator intervention held fixed. The indirect effect at treatment 1 is \(\operatorname{IIE}(1)=0.380-0.275=0.105\), a 10.5-percentage-point increase when the mediator draw changes from the treatment-0 to the treatment-1 distribution while treatment is held at 1.
The Reference Level Is Part of the Effect
A direct effect is not fully specified until its mediator-distribution reference is stated. Likewise, an indirect effect is not fully specified until its treatment level is stated. If the outcome response to the mediator differs across treatment levels, the indirect contrast can differ between treatment 0 and treatment 1. If the mediator distributions differ, the direct contrast can also depend on which distribution is held fixed. These differences are features of the defined causal contrasts, not calculation errors.
Worked Example: Effects at Both Reference Levels
In a second hypothetical population, suppose \(q_0=0.20\) and \(q_1=0.70\). Let the outcome risks be \(r_{00}=0.05\), \(r_{01}=0.45\), \(r_{10}=0.30\), and \(r_{11}=0.40\). Calculate the indirect effects at both treatment levels and the direct effects using both mediator-distribution references.
First calculate the risks under treatment 0:
Under treatment 1, the risks are
The indirect effect at treatment 0 is \(\operatorname{IIE}(0)=0.330-0.130=0.200\), or 20.0 percentage points. At treatment 1 it is \(\operatorname{IIE}(1)=0.370-0.320=0.050\), or 5.00 percentage points. The mediator-distribution shift has different consequences at the two treatment levels because the stipulated outcome risks across mediator values differ by treatment.
The direct effects are \(\operatorname{IDE}(0)=0.320-0.130=0.190\), or 19.0 percentage points, when the mediator is drawn from its treatment-0 distribution, and \(\operatorname{IDE}(1)=0.370-0.330=0.040\), or 4.00 percentage points, when it is drawn from its treatment-1 distribution. Thus, reporting only “the direct effect” without its mediator reference would leave the estimand ambiguous.
What a Zero Indirect Effect Can Mean
An indirect effect concerns the change in risk caused by changing the mediator distribution under a specified treatment. It is not simply a measure of whether the mediator is associated with the outcome. For example, an outcome can respond to the mediator, yet the indirect contrast can be zero if the two stochastic interventions use the same mediator distribution. It can also be zero at one treatment level and nonzero at another if the mediator’s effect on outcome risk depends on treatment.
Worked Example: No Indirect Effect at One Treatment Level
Consider a third hypothetical population with \(q_0=0.35\) and \(q_1=0.65\). Suppose \(r_{00}=0.08\), \(r_{01}=0.28\), \(r_{10}=0.25\), and \(r_{11}=0.25\). Calculate the indirect effects at treatment 0 and treatment 1, as well as the direct effect using the treatment-0 mediator distribution.
At treatment 0, the mediator distribution changes the risk:
Therefore, \(\operatorname{IIE}(0)=0.210-0.150=0.060\), a 6.00-percentage-point increase in risk. At treatment 1, both mediator values have the same stipulated risk, so
Thus \(\operatorname{IIE}(1)=0.250-0.250=0\) percentage points: changing the mediator draw distribution does not change risk at treatment 1 in this example. The direct effect using the treatment-0 mediator distribution is \(\operatorname{IDE}(0)=0.250-0.150=0.100\), a 10.0-percentage-point increase. Each result follows from the specified risks and intervention; none says that mediator-outcome association alone determines the effect.
Common Mistakes
- Leaving the intervention unspecified. “The mediator is held fixed” can be unclear when the mediator is stochastic. State whether its draw follows the treatment-0 or treatment-1 population distribution.
- Swapping the two arguments of \(\psi(t,a)\). The first argument is the treatment used for the outcome response; the second selects the mediator distribution. Keep that order consistent in every calculation.
- Calling a risk difference a probability. A contrast such as \(0.125\) is a difference of risks, or 12.5 percentage points, not a 12.5% probability that an individual outcome will occur.
- Assuming an estimand is automatically identified. Writing down \(\psi(t,a)\) defines a causal quantity. It does not show that observed data suffice to estimate it without bias.
- Assuming one indirect effect applies at every treatment level. Calculate \(\operatorname{IIE}(t)\) at the treatment level named in the question; the result may vary with \(t\).
Check Your Understanding
Use the definitions and weighted-average formula to answer the following.
- In \(\psi(0,1)\), which treatment level determines the outcome response, and which treatment level supplies the mediator distribution?
- If \(q_0=0.30\), \(q_1=0.60\), \(r_{00}=0.10\), and \(r_{01}=0.30\), calculate \(\psi(0,0)\) and \(\psi(0,1)\).
- In words, what does \(\operatorname{IDE}(1)\) compare? What mediator intervention is held fixed?
- Can \(\operatorname{IIE}(1)\) be zero even when the mediator changes outcome risk under treatment 0? Explain briefly.
- Why does defining an interventional effect not, by itself, establish that it is identifiable from observational data?