pmed() computes the core Pmed: with treatment held at x for both potential outcomes, the probability that Y(x, M(x)) exceeds Y(x, M(x*)), ties counted as one half. This article maps the other estimands in the package, what each is for, and the caveats the package states openly. The code chunks are not evaluated here; see each function’s help page for runnable examples.
| Function | Result class | What it estimates | Where to read more |
|---|---|---|---|
ward_residual() |
GaugePmedResult |
Gauge-calibrated P_med (residual over observed effect), with weak-identification gates | ward_residual(), the gauge-residual article |
incr_pmed() |
IncrPmedResult |
Incremental P_med at shift δ | incr_pmed(), the incremental article |
incr_sensitivity() |
(tipping table) | Per-δ mediator-outcome tipping analysis | incr_sensitivity() |
sobol_pmed() |
SobolPmedResult |
Variance-scale P_med | sobol_pmed() |
wasserstein_pmed() |
WassersteinPmedResult |
PmedW = NIEW/(NIEW + NDEW) from 2-Wasserstein distances between corner laws | wasserstein_pmed() |
rg_flow_contrast() |
RgFlowResult |
Scale-indexed NIE/TE with cluster-robust influence-function inference | rg_flow_contrast() |
pmed_sensitivity() |
PmedSensitivity |
Unmeasured mediator-outcome confounding (tipping point) shared across estimands | pmed_sensitivity() |
rg_flow_contrast() and the multilevel_designs dataset are deliberately not P_med variants: they estimate the classical proportion mediated and describe cluster designs.
pmed().rg_flow_contrast().For the binary-outcome Wasserstein proportion mediated, $P = \sqrt{|d_1|} / (\sqrt{|d_1|} + \sqrt{|d_2|})$ has a cusp wherever a contrast dj is zero. Findings from the boundary point-risk study (documented in the repository):
The full derivations, checks and decision report are in docs/specs/ and docs/reports/REPORT-boundary-point-risk-2026-10-21.md. One lemma (a local-minimax two-point bound) is derived but not yet independently audited.