Methods and literature

This page maps CausalTargeted APIs to the papers and books that define the estimands, identification conditions, and estimators. The implementations are Julia-native analogues of ideas developed in the LMTP / mediation literature (including the R lmtp and crumble packages); they are not line-for-line ports. Full bibliographic entries (with DOIs) are in References. Keys such as diaz2023lmtp match references.bib in the CDCS book. Engine naming (:lmtp / :mediation, not “crumble”) is summarised in NAMING.md.

Modified treatment policies and LMTP

Scientific problem. Deterministic interventions that set a continuous exposure to a fixed value are often scientifically uninteresting and exacerbate positivity violations. Modified treatment policies (MTPs) shift or otherwise transform the natural value of treatment (e.g. raise exposure by one standard deviation, subject to clamps).

TopicPrimary sourcesCausalTargeted surface
Stochastic / population interventionsDíaz & van der Laan (2012), BiometricsShiftPolicy, additive / multiplicative / threshold policies
Longitudinal MTPs (LMTP): ID, EIF, TMLE & sequential DRDíaz, Williams, Hoffman & Schenck (2023), JASArun_lmtp_grid, lmtp_tmle_contrast, LongitudinalPolicy
Software reference (R)Williams & Díaz (2023), Observational StudiesConceptual parity, not API identity
Survival / competing risks LMTP (future scope)Díaz, Hoffman & Hejazi (2024), Lifetime Data AnalysisDocumented as out of scope for now

Point-treatment continuous MTP. run_lmtp_grid estimates a δ-indexed curve under a user-chosen ShiftPolicy, with cross-fitted outcome and treatment nuisances and optional TMLE fluctuation. Density-ratio options (gaussian, classification, hybrid) implement practical continuous-exposure clever covariates in the spirit of the LMTP literature.

The identifying DAG for the linear synthetic DGP (simulate_linear_mtp) is baseline confounding of a continuous exposure:

using CausalDynamics, Graphs, DAGMakie, CairoMakie

g = DiGraph(3)
add_edge!(g, 1, 2)  # W → A
add_edge!(g, 1, 3)  # W → Y
add_edge!(g, 2, 3)  # A → Y
fig = plot_with_adjustment_set(g, 2, 3, [1]; node_labels = ["W", "A", "Y"])
fig
Example block output

Sequential / multi-time LMTP. SequentialPolicy / run_sequential_lmtp implement a practical recursive outcome regression with a last-time TMLE-style correction, following the sequential identification strategy of Díaz et al. (2023). Pair with CausalDynamics TemporalEffectQuery + unroll_temporal_dagidentifysequential_identification_certificate so estimation carries an explicit ID certificate.

Targeted learning, Super Learner, and cross-fitting

TopicPrimary sourcesCausalTargeted surface
TMLEvan der Laan & Rubin (2006); van der Laan & Rose (2011, 2018)estimator=:tmle, fluctuation helpers
Super Learnervan der Laan, Polley & Hubbard (2007)DEFAULT_SL_LEARNERS, RICH_SL_LEARNERS, SMALL_N_SL_LEARNERS, fit_super_learner
Optional MLJ linear nuisancesMLJ / MLJLinearModels (weakdep):mlj_ridge, :mlj_lasso, :mlj_elasticnet, :mlj_logistic after using MLJ, MLJLinearModels (features standardised; never in small-n presets)
Optional neural nuisancesMLJFlux (Flux):mlj_mlp, :mlj_nn_binary after using MLJFlux — never in small-n presets
Cross-fitting / sample splittingZheng & van der Laan (2011); Chernozhukov et al. (2018)crossfit_indices, fold caches
Applied TMLE overviewSchuler & Rose (2017)Pedagogical pointer

At small n***, rich libraries overfit. recommend_run_options / adaptive_learners prefer lean GLM/mean stacks when n < 80, consistent with the Super Learner principle that the library must be *estimable at the sample size at hand. Optional MLJ / MLP candidates are **opt-in: they can improve recovery on some DGPs in a single synthetic draw while diluting others (overfitting vs generalisation). Prefer repeated Monte Carlo and library ablations before changing defaults.

Interventional mediation grids

Natural direct/indirect effects (Pearl, 2001; Robins & Greenland, 1992; VanderWeele, 2015) require cross-world assumptions that fail under intermediate confounding. Interventional (randomised interventional) effects (Vansteelandt & Daniel, 2017) and stochastic intervention mediation (Díaz & Hejazi, 2020; Hejazi et al., 2023) weaken those assumptions. Liu, Williams, Rudolph & Díaz (2024) unify modern mediation estimands with MTPs; the R package crumble (Liu et al., 2025 tutorial) is a software companion—Julia APIs use mediation names (run_mediation_grid, engine :mediation), with soft-deprecated run_crumble_* / :crumble aliases.

TopicPrimary sourcesCausalTargeted surface
Stochastic mediation (in)direct effectsDíaz & Hejazi (2020), JRSS-BConceptual basis for continuous-A mediation
Stochastic interventional effects with intermediate confoundingHejazi et al. (2023), BiostatisticsDesign target for robust mediation contrasts
Unified targeted mediation + MTPLiu et al. (2024), arXiv:2408.14620run_mediation_grid, MediationContrast
Tutorial / R package companionLiu et al. (2025), arXiv:2604.09902Estimand catalogue; cite, do not brand Julia after “crumble”
Classical mediation textbookVanderWeele (2015)Interpreting NDE/NIE vs interventional contrasts

Implementation note. run_mediation_grid estimates TE / NDE / NIE under continuous MTP shifts via nested Monte Carlo and cross-fitted nuisances. Nested-MC variability is first-class: mediation_n_mc_sweep and mediation_stability_summary quantify SE and sign stability across n_mc (essential at small n).

A minimal mediation DAG (A → M → Y, A → Y) for interpreting those contrasts:

using DAGMakie, CairoMakie

fig, _ax, _p = dagplot_mediation(["A", "M", "Y"])
fig
Example block output

Fold/δ cache. build_mediation_fold_cache (and the LMTP analogue) reuse outcome / mediator / exposure fits across δ within folds—same statistical estimand, lower wall time.

Positivity and support

Positivity (overlap) is necessary for identification of interventional means (Hernán & Robins, 2020; Petersen et al., 2012). MTPs are often designed so that shifted exposures remain in the support of the observed treatment law (Díaz et al., 2023).

TopicPrimary sourcesCausalTargeted surface
Diagnosing positivity violationsPetersen et al. (2012)positivity_report, positivity_markdown
Clamp / support diagnostics under additive shiftsLMTP practice (Díaz et al., 2023)support / clamp helpers in mtp_common.jl; grid positivity=true

Sensitivity to unmeasured confounding

Even with correct adjustment sets, estimates can tip under omitted confounding. CausalTargeted exposes diagnostic tipping-point and partial-R² calibrations inspired by Cinelli & Hazlett (2020); complementary classical tools include VanderWeele & Ding (2017) E-values and Rosenbaum (2002) sensitivity models.

TopicPrimary sourcesCausalTargeted surface
Partial R² / robustness-value style OVBCinelli & Hazlett (2020), JRSS-Bpartial_r2_calibration, sensitivity_report
E-valueVanderWeele & Ding (2017)Cite for reporting; not duplicated here
Discovery as sensitivity, not oraclePearl (2009); Spirtes et al. (2000)discovery_adjustment_sensitivity, merge_discovery_sensitivity!

Never silently replace a user DAG with a discovery graph in production defaults.

Identification certificates (CausalDynamics bridge)

Estimation attaches provenance via identification_certificate / attach_run_metadata!. Upstream ID uses Pearl’s do-calculus toolkit (Pearl, 2009; Shpitser & Pearl, 2006) and g-methods (Robins, 1986; Robins, 2000). Time-indexed queries use TemporalDAGSpec / unroll_temporal_dag / TemporalEffectQuery in CausalDynamics (see that package’s References).

Small-n profile

Conservation biology, ecology, and early trials often have tens to low hundreds of units. recommend_folds, SMALL_N_SL_LEARNERS, and recommend_run_options encode memory-safe, positivity-aware defaults (parallel=false, higher mediation n_mc when n is small). See the Small-n checklist.

What we deliberately do not claim

  • Full parity with every option in R lmtp / crumble (GPU Riesz nets, all mediation estimand flavours, survival LMTP).
  • That tipping-point / partial-R² helpers replace design-based identification.
  • That Super Learner at n ≈ 30 recovers oracle rates—diagnostics exist precisely because they often do not.