Path-specific (per-mediator) decomposition of an indirect effect
Source:R/path_effects.R
path_effects.RdSplits the indirect effect of from on to into a contribution for each
mediator, by toggling which mediators are allowed to respond. Two model-based
per-mediator quantities are reported:
Arguments
- object
A
drm_semobject.- from
Predictor variable or node name.
- to
Endogenous target node.
- through
Optional subset of mediator node names to attribute over (defaults to all mediators between
fromandto).- by
"mediator"(default) reports the per-mediatorinclusion/exclusionsplit with aninteraction_remainder."component"instead splits each mediator's indirect effect into amean_channel(the mediator passes only its mean) and one channel per non-mean component (sigma_channel,zi_channel, ... – the drop when that component is frozen at its reference value), plus acomponent_remainderfor the part that does not separate cleanly (the channels are not an exact partition under a nonlinear outcome).- effect
"controlled"(default) gives the model-based per-mediator / per-component decomposition above."natural"instead reports each mediator's cross-world natural indirect effect (thenieleg when only that mediator is set to its counterfactual world), with anidentifiedcolumn that isFALSEwhen a recanting witness (another mediator that is a descendant offromand an ancestor of this one) makes the natural path-specific effect non-identified.byis ignored wheneffect = "natural".- at
Optional length-2 contrast values for
from.- B
Number of uncertainty replicates (coefficient draws) used when
uncertainty = "parametric".- uncertainty
How to propagate parameter uncertainty:
"parametric"(draw coefficients fromMVN(coef, vcov), the default),"none"(MLE point estimate, no interval), or"bootstrap"(refit per replicate; not yet implemented, OQ-10).- nsim
Inner distributional realizations per uncertainty draw (used for non-mean
targets).- population
"conditional"(random effects held at zero, the default) or"marginal"(integrate over the fitted random-effect distribution; not yet implemented, OQ-9).- level
Confidence level for the Monte-Carlo interval.
- seed
Optional RNG seed.
- draw, n_sim
Deprecated aliases for
uncertainty(draw = TRUE/FALSEmaps to"parametric"/"none") andnsim; supplying either emits a deprecation warning.- ...
Unused.
Value
A drm_effect data frame with columns from, to, through,
mediator, estimand, estimate, conf.low, conf.high. For
by = "mediator" the estimand values are total_indirect, inclusion,
exclusion, interaction_remainder; for by = "component" they are
total_indirect, mean_channel, <component>_channel (one per non-mean
component), and component_remainder. The frame also carries an
identified column (NA for controlled rows; logical for natural rows).
Details
inclusion – the effect carried by
X -> Mj -> Ywhen onlyMjresponds (all other mediators held at their observed values):T({Mj}) - direct.exclusion –
Mj's marginal contribution when every other mediator is already active:T(all) - T(all \ Mj).
These coincide only when the mediators act additively (parallel mediators, no
downstream nonlinearity, no exposure-mediator or mediator-mediator
interaction). The output therefore always includes a total_indirect row
and an explicit interaction_remainder = total_indirect - sum(inclusion),
which is ~0 in the additive case and non-zero otherwise – the per-mediator
effects are never rescaled to force them to sum. This is a model-based
decomposition, not a claim of nonparametric path-specific identification; see
docs/design/02-effect-calculus.md.
References
Pearl J (2001). “Direct and Indirect Effects.” In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence (UAI), 411–420.
Pearl J (2009). Causality: Models, Reasoning, and Inference, 2nd edition. Cambridge University Press, Cambridge.
Avin C, Shpitser I, Pearl J (2005). “Identifiability of Path-Specific Effects.” In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence (IJCAI-05), 357–363.
Imai K, Keele L, Yamamoto T (2010). “Identification, Inference and Sensitivity Analysis for Causal Mediation Effects.” Statistical Science, 25(1), 51–71. doi:10.1214/10-STS321 .
VanderWeele TJ (2015). Explanation in Causal Inference: Methods for Mediation and Interaction. Oxford University Press, New York.