Skip to content

Stroke case-study notebook (reproduces arXiv:2606.12623 on synthetic data) - #11

Open
oduerr wants to merge 1 commit into
mainfrom
feat/stroke-case-study-notebook
Open

Stroke case-study notebook (reproduces arXiv:2606.12623 on synthetic data)#11
oduerr wants to merge 1 commit into
mainfrom
feat/stroke-case-study-notebook

Conversation

@oduerr

@oduerr oduerr commented Jun 16, 2026

Copy link
Copy Markdown
Member

Adds notebooks/stroke_case_study.py — reproduces the case-study paper Estimating Individualized Treatment Effects in Acute Ischemic Stroke with TRAM-DAG (arXiv:2606.12623) on the public synthetic magic-mrclean cohort (the clinical MAGIC/MR CLEAN data is private).

Mirrors the paper's pipeline: fit one flexible TRAM-DAG on the confounded observational arm (Age/NIHSSa nonlinear, mRS_pre/T linear, ordinal outcome), then predict per-patient ITEs on the randomized trial arm and validate. Reproduces:

  • Fig. 5 — ITE distribution, all positive, ATE = mean ITE +0.094;
  • Table 3 — ATE consistency: TRAM-DAG +0.094 vs known true +0.104 vs synthetic trial +0.094; naive confounded contrast +0.301;
  • Fig. 6 — model-simulated trial outcome shift under do(T=0/1);
  • Fig. 7 — treated-arm discrimination (observed good-outcome frequency rises with predicted probability).

Plus the validation the real study explicitly could not do (the fundamental problem of causal inference): with a known SCM, predicted vs true per-patient ITE — rank-corr 0.83, and the saturation of predicted ITE vs the SCM's true age-heterogeneity cleanly exposes the homogeneous-T modeling choice the paper flags as future work.

Self-contained (pip install tramdag, uses the packaged generator); validated end-to-end headless, all figures render. jupytext .py (the .ipynb stays git-ignored).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

…tic data)

notebooks/stroke_case_study.py reproduces the stroke ITE paper's pipeline
on the public magic-mrclean/nl synthetic cohort (clinical data is private):
fit a flexible TRAM-DAG on the confounded observational arm, predict
per-patient ITEs on the randomized trial arm, and validate. Reproduces
Fig. 5 (ITE distribution, ATE +0.094), Fig. 6 (model-simulated trial
outcome shift), Fig. 7 (treated-arm discrimination), Table 3 (ATE
consistency: TRAM-DAG +0.094 vs known true +0.104 vs trial +0.094, naive
confounded +0.301). Adds the validation the real study explicitly could
not: predicted vs true per-patient ITE (rank-corr 0.83), which also
exposes the homogeneous-T modeling limitation vs the SCM's true
age-heterogeneity. Validated end-to-end headless; figures render.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant