How CausalMediation compares

CausalMediation estimates modern mediation contrasts after identification: interventional TE / NDE / NIE under modified treatment policies, natural and organic effects when admissible, controlled direct effects, and recanting-twin / path-specific summaries. Intermediate confounders (moc) are first-class. Super Learner, ShiftPolicy, and fold helpers come from CausalTargeted.jl; graphs and certificates from CausalDynamics.jl.

R packages crumble, medoutcon, and medRCT are the closest conceptual analogues (not API identity; see Naming). Ananke covers some mediation-adjacent targets in Python; LMTP without mediators stays in CausalTargeted / R lmtp.

Choose CausalMediation when you want Julia-native mediation with typed moc, shared IdentificationResult hand-off, and the same Super Learner stack as LMTP.

Prefer crumble / medoutcon when the analysis pipeline is already R end-to-end, or you need a specialised option this package deliberately does not claim (full GPU Riesz nets, every survival flavour).

Stack overview: ECOSYSTEM_COMPARISON.md.

flowchart LR
  subgraph juliaStack [Julia_typed_pipeline]
    G[Graph_CDM] --> ID[identify_certificate]
    ID --> MED[CausalMediation]
    ID --> LMTP[CausalTargeted_LMTP]
    ID --> PLOT[DAGMakie]
  end

Legend

MarkMeaning
YesFirst-class, documented
PartialPossible with glue or a limited API
Not in that package’s usual scope
UniqueStrong differentiator here

Versus R and Python (mediation)

CapabilityCausalMediationRPython
Interventional TE/NDE/NIE + continuous MTPYesYes (crumble RI, medoutcon)Partial (Ananke)
Intermediate confounding (moc)YesYes (crumble, medoutcon, medRCT)Partial
Natural effects (empty moc)YesYes (crumble "N")Partial
Organic effectsYesYes (crumble "O")
Recanting-twin / path-specificYesPartial (crumble "RT")
Controlled direct effectYesYes (VanderWeele / related)Partial
Typed ID certificate → estimateUniquePartialPartial
Cross-fit Super Learner (shared with LMTP)Yes (via CausalTargeted)Yes (sl3 + crumble)Partial
LMTP without mediators— (use CausalTargeted)Yes (lmtp)Yes (Ananke)
Full parity with every crumble option— (deliberate)Yes

Julia neighbours

PackageRole
CausalDynamics.jlMediationQuery, identify, IdentificationResult.moc
CausalTargeted.jlSL, ShiftPolicy, LMTP; soft mediation façades
DAGMakie.jlOptional DAG figures
TMLE.jlPoint-treatment CM / ATE (not mediation)

What is distinctive here

  • Typed hand-offplan_mediation / spec_from_identification carry adjustment, mediators, and moc from the certificate into estimation
  • Effect families as typesInterventionalMediation, NaturalMediation, … rather than opaque string brands
  • Shared nuisances with LMTP — same lean Super Learner profiles and shift policies as CausalTargeted

What we deliberately do not claim

Full parity with every option in R crumble / medoutcon (GPU Riesz nets, all survival mediation flavours). Continuous MTP one-step uses an outcome-residual augmentation of the nested-MC plugin (see Methods); binary contrasts use the fuller EIF path.

The CDCS book walks identify → estimate → display end to end.