A path-specific effect sets the treatment to different values on
different edges: mediators marked in path see A = 1, all
other mediators see A = 0, and the outcome node sees
A = 1; the contrast is against the all-zero regime. This is
identified only when there is no recanting witness, which the caller
asserts by supplying path – the function cannot check the
graph for it.
Details
Mediators are taken in column order as a causal chain, each modelled
linearly on treatment, covariates and the mediators before it. The
counterfactual mediator values are generated recursively at the
path-assigned treatment values, so an upstream counterfactual feeds
the downstream model. With every model linear the plug-in reduces to
the product of coefficients along the selected paths, and its
influence curve is the delta method on the stacked least-squares
influence functions. No fluctuation is applied: the point-treatment
clever covariate D/g - (1 - D)/(1 - g) solves the score of the
total effect, not the path-specific one (eps is 0).
