---
title: Two-Part Mediation Effect Analysis
url: https://www.emergentmind.com/topics/two-part-mediation-effect
type: topic
---

# Two-Part Mediation Effect Analysis

Two-Part Mediation Effect denotes a family of causal decompositions in which the effect of an exposure on an outcome is partitioned into two principal components, but the components depend on the estimand, intervention semantics, and data-generating structure. In the cited literature, the two parts include the natural direct effect and natural indirect effect, the controlled direct effect and scaled controlled indirect effect, a numerical-change and a binary-change component for zero-inflated mediators, and adding-versus-subtracting ratio-scale decompositions in vaccine trials [2006.11689] [2412.15401] [2301.10064] [2208.06465]. This suggests that the phrase is best understood as a context-dependent mediation framework rather than a single universally fixed quantity.

## 1. Conceptual scope

Across the literature, a two-part mediation decomposition always separates an exposure effect into two analytically distinct pieces, but the target of the split changes with the causal question. In classical mediation, the split is direct versus indirect. In controlled-intervention formulations, the split is a manipulation-specific direct effect versus a mediator-specific indirect contribution. In zero-inflated mediator models, the indirect effect itself is split into a numerical component and a binary component. In ratio-scale vaccine analyses, the total ratio effect is partitioned multiplicatively rather than additively.

| Setting | Two parts | Representative decomposition |
|---|---|---|
| Controlled single-mediator intervention | \(CDE_k(0)\), \(sCIE_k\) | \(TE = CDE_k(0) + sCIE_k\) |
| Quantile mediation | \(qNDE_\tau\), \(qNIE_\tau\) | \(qTE_\tau = qNDE_\tau + qNIE_\tau\) |
| Zero-inflated mediator | \(NIE_{\text{numerical}}\), \(NIE_{\text{binary}}\) | \(NIE = NIE_{\text{numerical}} + NIE_{\text{binary}}\) |
| Vaccine ratio-scale mediation | \(\theta_I\), \(\theta_D\) | \(\theta_T = \theta_I \theta_D\) |

The main technical distinctions are whether the decomposition is additive or multiplicative, whether it is defined by natural or controlled interventions, whether it relies on cross-world counterfactuals, and whether interaction is folded into one of the two parts or isolated separately in an extended decomposition.

## 2. Controlled decompositions with multiple mediators

A particularly explicit use of the term is the clinically oriented framework for multiple manipulable mediators with arbitrary causal dependencies developed in “Clinically Relevant Mediation Analysis using Controlled Indirect Effect” [2006.11689]. The setup uses a binary exposure \(A \in \{a,a^*\}\), outcome \(Y\), binary mediators \(M=(M_1,\dots,M_K)\), and baseline covariates \(L\). Mediators may form any directed acyclic graph, with recursive counterfactual construction
\[
M_k(a)=M_k(a,\mathrm{Pa}\{M_k\}(a)).
\]
For mediator \(k\), the potential outcome under a single-mediator intervention is
\[
Y_k(a,m)=Y(a,M_1(a),\dots,M_{k-1}(a),m,M_{k+1}(a),\dots,M_K(a)).
\]

The total effect is
\[
TE = E[Y_a]-E[Y_{a^*}],
\]
and the controlled indirect effect for mediator \(M_k\) at exposure level \(a\) is
\[
CIE_k(a)=Y_k(a,1)-Y_k(a,0).
\]
The corresponding manipulation-specific direct effect is
\[
CDE_k(0)=Y_k(1,0)-Y_k(0,0),
\]
and the scaled controlled indirect effect is
\[
sCIE_k = M_k(1)\cdot CIE_k(1) - M_k(0)\cdot CIE_k(0).
\]
The defining two-part decomposition is
\[
TE = CDE_k(0) + sCIE_k.
\]

This formulation differs from natural direct and indirect effects because it avoids cross-world counterfactuals entirely and focuses on manipulating one mediator at a time. Identification is based on consistency, positivity, and single-world ignorability,
\[
M_k(a)\perp A \mid L,\qquad Y_k(a,m)\perp A,M_k \mid L,
\]
with the key g-formula
\[
E[Y_{a,\mathrm{do}(M_k=m)}]
=
\int E[Y \mid A=a, M_k=m, M_{-k}=m_{-k}, L=\ell]\,
f(M_{-k}\mid A=a,L=\ell)\,f(L=\ell)\,dm_{-k}\,d\ell.
\]

Estimation can proceed by parametric g-computation or by the doubly robust estimators
\[
M_k(a) \approx \frac{1}{N} \sum_{i=1}^N \left[ f_{M,k}^{(i)} + \frac{I(A^{(i)}=a)}{g_M^{(i)}} \cdot (M_k^{(i)} - f_{M,k}^{(i)}) \right],
\]
\[
Y_k(a,m) \approx \frac{1}{N} \sum_{i=1}^N \left[ f_{Y,k}^{(i)} + \frac{I(A^{(i)}=a, M_k^{(i)}=m)}{g_{Y,k}^{(i)}} \cdot (Y^{(i)} - f_{Y,k}^{(i)}) \right].
\]
The paper uses nested cross-validation and selective machine learning to choose among penalized logistic/linear regression, linear SVM, random forest, and XGBoost, with confidence intervals via bootstrap.

The empirical illustrations emphasize the decision-theoretic role of the decomposition. In the framing dataset, Emotion had \(sCIE \approx 0.20[-0.014,0.29]\), approximately \(56.6\%\) of the total effect, while Perceived Harm had \(sCIE \approx 0.12[-0.13,0.20]\), approximately \(39.0\%\) of the total effect. In the HIV–Brain Age cohort, Hyperlipidemia had \(sCIE \approx 4.36[-0.55,8.22]\) and \(CIE_1 \approx 5.35[-1.21,9.84]\), which the paper interprets as indicating substantial clinical benefit from treating hyperlipidemia. The framework therefore ranks mediators by \(sCIE_k\) when the goal is to reduce the exposure’s total effect by treating one mediator.

## 3. Direct–indirect decompositions on quantile and moderator-varying scales

In classical mediation language, the two parts are the direct effect and the indirect effect. “Quantile Mediation Analytics” extends this split from the mean to the outcome distribution by defining
\[
qNDE_\tau(s,s';x)=Q_{Y(s',M(s))\mid X}(\tau \mid x)-Q_{Y(s,M(s))\mid X}(\tau \mid x),
\]
\[
qNIE_\tau(s,s';x)=Q_{Y(s',M(s'))\mid X}(\tau \mid x)-Q_{Y(s',M(s))\mid X}(\tau \mid x),
\]
with
\[
qTE_\tau(s,s';x)=qNDE_\tau(s,s';x)+qNIE_\tau(s,s';x).
\]
Under a generalized structural equation model built via a Gaussian copula, the paper derives closed-form expressions in terms of transformed probabilities \(\Phi(\Delta_{s',s}(\tau))\), and shows that in the special case where \(S\mid X\) and \(Y\mid X\) are normal, \(qNDE_\tau\) and \(qNIE_\tau\) do not depend on \(\tau\) and coincide with mean-based mediation counterparts [2412.15401].

A related but older quantile perspective decomposes the \(u\)-specific indirect effect into three interpretable factors. “A novel quantile-based decomposition of the indirect effect in mediation analysis” defines a local representation
\[
r(x,x^*,u,w)\cdot [s(u,x^*,w)]^{-1}\cdot q(u,x^*,w)
=
R(x,1,u,w)-R(x,0,u,w),
\]
where \(q(u,x^*,w)\) is the \(u\)-th quantile effect of the exposure on the mediator, \(r(x,x^*,u,w)\) is the outcome sensitivity to mediator rank \(u\), and \([s(u,x^*,w)]^{-1}\) is the mediator’s conditional density at the corresponding quantile [1710.00720]. In the infant mortality application, this decomposition showed that smoking strongly shifted the birthweight distribution, but for sudden infant death syndrome the estimated \(r(u)\) was approximately zero across deciles, so the mediated effect through birthweight was negligible.

Moderator-varying formulations preserve the same two-part logic on the link scale. In the generalized varying coefficient mediation model,
\[
DE(u)=\alpha_1(u),\qquad IE(u)=\beta(u)=\Gamma(u)\alpha_0(u),\qquad TE(u)=DE(u)+IE(u),
\]
where the coefficient functions vary smoothly with moderator \(u\) [2212.02043]. In the entrepreneurial withdrawal analysis, the estimated indirect effect declined with self-efficacy because the stress \(\rightarrow\) depressed affect path weakened as self-efficacy increased.

## 4. Zero-inflated, compositional, and mixture mediators

For zero-inflated mediators, the indirect effect itself acquires a two-part structure. “A Novel Causal Mediation Analysis Approach for Zero-Inflated Mediators” represents the mediator by its positive part \(M^+\) and the indicator \(Z=1\{M>0\}\), and defines
\[
NIE(a_1,a_0)=NIE_{\text{numerical}}(a_1,a_0)+NIE_{\text{binary}}(a_1,a_0),
\]
with
\[
NIE_{\text{numerical}}(a_1,a_0)
=
E\{Y_{a_0,M(a_1),Z(a_1)}\}-E\{Y_{a_0,M(a_0),Z(a_1)}\},
\]
\[
NIE_{\text{binary}}(a_1,a_0)
=
E\{Y_{a_0,M(a_0),Z(a_1)}\}-E\{Y_{a_0,M(a_0),Z(a_0)}\}.
\]
Under the linear outcome model
\[
Y=\beta_0+\beta_1 M+\beta_2 Z+\beta_3 A+\beta_4(A\cdot Z)+\beta_5(A\cdot M)+\varepsilon,
\]
the binary component captures mediation through zero versus non-zero status, whereas the numerical component captures mediation through changes in the positive part of the mediator [2301.10064].

For microbiome relative abundances, MarZIC uses the same logic in a compositional setting. The outcome model
\[
Y = \beta_0 + \beta_1 M_j + \beta_2 1(M_j > 0) + \beta_3 X + \beta_4 X 1(M_j > 0) + \beta_5 X M_j + \varepsilon
\]
yields
\[
NIE = NIE_1 + NIE_2,
\]
where \(NIE_1\) is mediation through nonzero abundance and \(NIE_2\) is mediation through presence probability. The framework explicitly models false zeros through the limit-of-detection rule
\[
Pr(M_j^*=0\mid M_j,L)=1(M_jL<1),
\]
and estimates parameters by maximum likelihood with numerical integration over latent positive values when an observed zero may be false [1906.09175].

“Causal Mediation Analysis for Zero-inflated Mixture Mediators” generalizes this to finite mixtures, allowing zero-inflated log-normal mixture, zero-inflated Poisson mixture, and zero-inflated negative binomial mixture families. The mediator density is
\[
f_M(m;\theta)=
\begin{cases}
\Delta, & m=0,\\
(1-\Delta)\sum_{k=1}^K \psi_k f_k(m;\theta_k), & m>0,
\end{cases}
\]
and the paper again decomposes
\[
NIE = NIE_1 + NIE_2
\]
into numerical-change and binary-change components, with EM estimation over both latent mixture membership and true-versus-false zero status, and BIC used to choose the number of mixture components [2507.15164]. In the ABCD neuroscience study, the mixture method detected cases where \(NIE_2\) and total \(NIE\) were significant and also cases where \(NIE_1\) was significant, thereby distinguishing hurdle effects from magnitude effects. The MAZE package implements these zero-inflated mediation procedures.

## 5. Two-part mediation as a testing problem

In another line of work, “two-part” refers to the two links that generate the mediated effect: exposure \(\rightarrow\) mediator and mediator \(\rightarrow\) outcome. Under the canonical linear mediation model
\[
M=\gamma_0+\gamma_X'X+\gamma_A A+\varepsilon_1,\qquad
Y=\beta_0+\beta_X'X+\beta_A A+\beta_M M+\varepsilon_2,
\]
the mediation null is
\[
H_0:\gamma_A \beta_M = 0,
\]
with component hypotheses \(H_{0,1}:\gamma_A=0\) and \(H_{0,2}:\beta_M=0\) [2105.14596]. The joint-significance test uses
\[
p_{\text{joint}}=\max\{p_1,p_2\},
\]
and is asymptotically conservative when both nulls are true because
\[
P(p_{\text{joint}}\le \alpha)\to \alpha^2
\]
under Case \((00)\).

“Improving Efficiency of Tests for Composite Null Hypotheses” addresses this conservativeness with adaptive two-stage procedures: a filtration step identifies hypotheses likely to be Case \((00)\), and a second-stage base test adjusts thresholds to control FWER. The paper connects this filtration to shrinkage through
\[
\tilde T = (T-\psi(\theta_0))1\{S\notin Q\}+\psi(\theta_0),
\]
with \(\psi(\theta)=\gamma_A\beta_M\), and analyzes local asymptotic efficiency and FWER control.

“Subsampling-based Tests in Mediation Analysis” attacks the same composite-null problem through repeated \(K\)-way sample splitting. On each split it computes Sobel statistics \(S_{G_i}\), forms the studentized statistic
\[
T = K^{1/2}\bar S_K \bigg/ \left\{ \frac{1}{K-1}\sum_{i=1}^K (S_{G_i}-\bar S_K)^2 \right\}^{1/2},
\]
and proves that for fixed \(K\), \(T \Rightarrow t_{K-1}\) under all three null cases. The paper recommends \(K=\lfloor 0.5 n^{1/2}\rfloor\) and \(M=500\) repeated splits, with final aggregation by a Cauchy combination test [2411.10648].

High-dimensional mediation replaces scalar products by aggregate products across many mediators. “Testing High-Dimensional Mediation Effect with Arbitrary Exposure-Mediator Coefficients” targets
\[
\gamma = \beta_A^\top \theta_M,
\]
constructs a debiased estimator
\[
\hat\gamma = \tilde\gamma + n^{-1}\hat U^\top X^\top (Y-X\hat\theta),
\]
and stabilizes inference under the difficult composite-null corner \(\beta_A=0\) and \(\theta_M=0\) through the ridge-adjusted covariance
\[
V = V_0 + (\tau/n)I_q
\]
[2310.05539]. In the TCGA LUAD application, this procedure identified 169 significant gene sets at \(5\%\) FWER.

## 6. Interaction, cross-world assumptions, and adjacent decompositions

A recurrent controversy concerns whether a two-part decomposition should absorb treatment–mediator interaction into the indirect effect or represent it separately. “Path-Free Decomposition for Direct, Indirect and Interaction Effects in Mediation Analysis” argues that the conventional direct–indirect split is path-dependent for binary treatment and binary mediator, and proposes the path-free identity
\[
\mathbb{E}(Y_1-Y_0)
=
\mathbb{E}(Y^{10}-Y^{00})
+
\mathbb{E}\{(Y^{11}-Y^{10})(M^1-M^0)\}
+
\mathbb{E}\{(Y^{11}-Y^{10}-Y^{01}+Y^{00})M^0\},
\]
thereby separating direct, indirect, and interaction effects [2110.06504]. This result does not abolish two-part mediation, but it shows that some two-part decompositions conceal a third component.

The vaccine-trial literature exposes a different issue: multiplicative two-part mediation on the ratio scale can generate more than one indirect/direct split. “Mediation Analyses for the Effect of Antibodies in Vaccination” defines
\[
\theta_T = \frac{E[Y_{1M_1}]}{E[Y_{0M_0}]},
\qquad
\theta_{Ia} = \frac{E[Y_{0M_1}]}{E[Y_{0M_0}]},
\qquad
\theta_{Is} = \frac{E[Y_{1M_1}]}{E[Y_{1M_0}]},
\]
with \(\theta_T=\theta_I\theta_D\) and corresponding proportions mediated
\[
\lambda_a=\frac{\log(\theta_{Ia})}{\log(\theta_T)},\qquad
\lambda_s=\frac{\log(\theta_{Is})}{\log(\theta_T)}.
\]
The paper stresses that these are distinct unless the effect of adding antibodies to the placebo arm equals the effect of subtracting antibodies from the vaccine arm, and that identification of \(\lambda_a\) may fail when placebo recipients do not have the relevant antibodies because PosM0 fails [2208.06465]. This is why the paper proposes three-arm passive-immunization designs and combinations of vaccine and passive-immunization trials.

For two mediators, interaction can be decomposed still further. “Decomposition of the Total Effect for Two Mediators” introduces natural counterfactual interaction effects and partitions the total effect into mediation only, interaction only, both mediation and interaction, and neither mediation nor interaction. In the sequential case, the identifiable decomposition is
\[
TE = CDE + INT_{\text{ref--}AM1} + INT_{\text{ref--}AM2+AM1M2} + NatINT_{AM1} + NatINT_{AM2} + NatINT_{AM1M2} + NatINT_{M1M2} + PIE_{M1} + PIE_{M2},
\]
showing that two-part mediation can be embedded בתוך richer interaction-aware taxonomies [2007.16031].

Finally, some work retains the classical two-part \(NDE/NIE\) split but changes the confounding structure. BASMU augments high-dimensional structured mediation models with latent individual effects \(\eta_i\) and their outcome impact \(\nu(s)\), deriving asymptotic bias when unobserved confounders are omitted and proposing a two-stage estimation algorithm. In the ABCD fMRI application, BASMU identified two to four times more voxels with significant mediation effects, with the NIE increased by \(41\%\) and the NDE decreased by \(26\%\) relative to a model omitting the unobserved confounders [2407.04142].

Taken together, these results show that Two-Part Mediation Effect is not a single estimand but a structured way of partitioning causal transmission into two dominant components under a specified intervention regime, scale, and identification strategy. The substantive meaning of the two parts depends on whether the analysis privileges natural or controlled interventions, mean or quantile targets, scalar or distributional mediators, additive or ratio scales, and whether interaction is absorbed, isolated, or re-expressed through richer counterfactual decompositions.

Source: https://www.emergentmind.com/topics/two-part-mediation-effect