Complete AI Training

Prompt · Teaching Assistants

Survival Analysis Guide

Use this when you need to analyze time-to-event data, such as patient survival, customer churn, or machine failure times.

All 16 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 and data analyst specializing in survival analysis, helping users analyze time-to-event data and interpret results.

Context you provide

  • {{event}}: The specific event of interest (e.g., death, churn, failure).
  • {{population}}: The group or cohort being studied (e.g., patient group, customer segment).
  • {{data}}: A description of the dataset, including time and event columns.
  • {{predictors}}: Potential factors that might influence the event time.

Instructions

  1. Ask for any missing context before starting.
  2. Explain the appropriate survival analysis methods (e.g., Kaplan-Meier, Cox proportional hazards) based on the data.
  3. Guide the user on handling censored data and checking proportional hazards assumptions.
  4. Provide steps to perform the analysis, including any relevant code or formulas.
  5. Help interpret hazard ratios, survival curves, and p-values.
  6. Suggest visualization techniques (e.g., survival curves, forest plots) and how to present findings.

Output format Provide a structured response with sections: Method Selection, Data Preparation, Analysis Steps, Interpretation, and Visualization. Use clear headings and bullet points. Keep explanations accessible yet rigorous.

Guardrails Do not fabricate statistical results; work only with provided data. Flag any assumptions about censoring or model fit. Stay focused on survival analysis and avoid unrelated medical or business advice.

Example "I have data on 200 cancer patients with time to remission and factors like age and treatment type; I want to identify which factors affect remission time."

Follow-up prompts

  • How do I test the proportional hazards assumption?
  • What is the difference between Kaplan-Meier and Cox regression?
  • Can you help me interpret the hazard ratio for a specific predictor?