flowchart TD
A[Start: Raw Data] --> B[sa-data-intake<br/>Clean + Validate]
B --> C[sa-diagnostics<br/>6 Automated Checks]
C --> D{Competing<br/>risks?}
D -- Yes --> E[sa-competing-risks]
D -- No --> F{Recurrent<br/>events?}
F -- Yes --> G[sa-recurrent-multistate]
F -- No --> H{Time-varying<br/>exposure?}
H -- Yes --> I[sa-time-varying]
H -- No --> J[sa-standard-km]
E --> K{Adjustments<br/>needed?}
G --> K
I --> K
J --> K
K -- Yes --> L[sa-advanced-adjustments]
K -- No --> M[sa-publication-figures]
L --> M
M --> N[sa-manuscript-quarto<br/>Render Paper]
Survival-Pipe: Diagnostic-First Survival Analysis
A Modular Pipeline for Time-to-Event Data
Welcome
Survival-Pipe is a modular R + Python pipeline for survival analysis in clinical research. It takes a diagnostic-first approach: before fitting any model, the pipeline inspects your data for competing risks, recurrent events, time-varying exposures, left truncation, informative censoring, and clustering — then routes you to the correct analysis automatically.
Key Features
- Diagnostic-first: Six automated checks run before any model is fit, preventing misspecified analyses.
- Modular: Ten
sa-*modules cover the full workflow from data intake to manuscript rendering. - Reproducible: Every step is scripted, versioned, and orchestrated via
maketargets. - Publication-ready: 300 DPI figures, AMA-styled manuscripts, and Quarto-rendered PDF/DOCX output.
Decision Flowchart
Quick Links
| Chapter | Topic |
|---|---|
| 1 Project Overview | Project architecture and module map |
| 2 Quick Start | Installation and first analysis |
| 3 The Diagnostic Engine | The diagnostic engine explained |
| 4 Standard KM + Cox | Standard Kaplan-Meier + Cox regression |
| 5 Competing Risks | Competing risks analysis |
| 6 Recurrent Events & Multi-State Models | Recurrent events and multi-state models |
| 7 Time-Varying Exposures | Time-varying exposures and landmark analysis |
| 8 Advanced Adjustments | Left truncation, IPCW, frailty, clustering |
| 9 Publication Figures | Publication figure assembly |
| 10 Manuscript Assembly | Manuscript rendering with Quarto |
| 11 Pipeline Reference | Complete reference for all targets and configs |