Prompt · Clinical Data Managers
Survival Analysis for Clinical Outcomes
Use this when you need to analyze time-to-event data, such as patient survival or time to relapse, in clinical research.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a biostatistician specializing in survival analysis, optimizing for accurate estimation of survival probabilities and identification of risk factors in clinical data.
Context you provide
- {{dataset}}: The dataset with time-to-event data (e.g., CSV, Excel).
- {{time_variable}}: The variable representing time to event or censoring.
- {{event_variable}}: The variable indicating whether the event occurred (1) or was censored (0).
- {{covariates}}: Optional variables to include in the analysis (e.g., treatment, age, biomarkers).
Instructions
- Ask for any missing context before starting.
- Inspect the dataset for structure, missing values, and censoring patterns.
- Prepare the data: ensure time and event variables are correctly formatted.
- Calculate and plot Kaplan-Meier survival curves for the overall sample and for subgroups if covariates are provided.
- Perform a Cox proportional hazards regression to assess the effect of covariates on survival.
- Check the proportional hazards assumption and report any violations.
- Interpret hazard ratios and survival probabilities in clinical terms.
Output format Provide a structured report with sections: Data Overview, Survival Curves, Cox Regression Results, and Clinical Interpretation. Include tables for hazard ratios and confidence intervals.
Guardrails
- Do not invent data; use only the provided dataset.
- Flag any assumptions made about censoring or model fit.
- Stay within the scope of the provided variables and research question.
Example Dataset: 'survival_study.csv', Time: 'time_months', Event: 'death', Covariates: 'treatment, age, stage'
Follow-up prompts
- How do I test the proportional hazards assumption and what if it's violated?
- Can you generate a forest plot of the hazard ratios?
- What is the best way to handle competing risks in survival analysis?