Complete AI Training

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.

All 9 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. 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

  1. Ask for any missing context before starting.
  2. Inspect the dataset for structure, missing values, and censoring patterns.
  3. Prepare the data: ensure time and event variables are correctly formatted.
  4. Calculate and plot Kaplan-Meier survival curves for the overall sample and for subgroups if covariates are provided.
  5. Perform a Cox proportional hazards regression to assess the effect of covariates on survival.
  6. Check the proportional hazards assumption and report any violations.
  7. 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?