skills/clinical-decision-support/references/survival_analysis.md
The bundled script validates a plan. It does not read time-to-event rows, fit models, draw curves, or provide an individual prognosis.
Align:
Record time zero, delayed entry, time scale, follow-up end, and calendar/data-cut date.
Specify:
Do not treat a competing event as ordinary independent censoring when the target is absolute event probability.
Kaplan-Meier estimates are suitable for survival from the event of interest under appropriate censoring assumptions. Report:
When competing events exist, use cumulative-incidence methods for event probabilities. Naively censoring competing events in Kaplan-Meier can overestimate absolute incidence.
The log-rank test compares event-time distributions and is most powerful under proportional alternatives. It does not quantify an effect. Pre-specify alternatives if curves may cross or effects may be delayed.
A Cox model estimates a hazard contrast conditional on model specification. Before presenting a single hazard ratio:
1 − HR as a reduction in cumulative risk.If proportional hazards is doubtful, consider:
Report why the selected summary answers the research question.
Distinguish:
State which question the method answers. A subdistribution hazard ratio is not directly a risk ratio. When modeling several event types, check that resulting probability estimates are coherent.
Primary reference: Austin, Lee, and Fine, competing risks.
Plan for:
Specify sensitivity analyses tied to plausible departures from assumptions. A “best/worst case” alone is rarely sufficient.
For time-to-event prediction:
Use TRIPOD+AI and PROBAST+AI.
For a prognostic biomarker:
For a predictive biomarker, estimate and report a treatment-by-biomarker interaction in an appropriate design. Separate prognostic association from treatment-effect modification.
Include:
Do not turn a threshold-crossing p-value into clinical importance.
python3 scripts/survival_plan_validator.py assets/survival_analysis_plan_template.json
An exit code of zero means required planning fields and selected consistency rules passed. It is not statistical approval.