← Choosing an analysis
Choosing an analysis

Survival analysis guide

When your outcome is the time until something happens, the right method depends on how your data are structured and what question you’re asking.

Kaplan–MeierCox regressionAFTCompeting risks & extensions12 methods

TimeWhen will it happen?

How long until a cancer comes back after treatment? How long before a customer cancels a subscription? How long does a machine run before it breaks down? These are all survival analysis questions, and they share one feature: it matters not just whether the event happens but when it happens.

There’s a catch: some subjects are still event-free when observation ends. Survival analysis puts that partial information to work instead of throwing it away. This guide explains censoring and event types, then shows how to choose among Kaplan–Meier, Cox, AFT, and extended models based on what you want to learn. The calculations and how to read each output table are covered in the individual chapters.

SECTION 01

Check four things before you choose a method

Start by looking at how events and follow-up times were recorded.

Study endsSubject 1Subject 2Subject 3Subject 4Subject 5Lost to follow-upSubject 6Month 0Month 3Month 6Month 9Month 12EventCensored
Figure 1. Events and censoring (concept)
A key idea first
Censoring doesn’t mean the event never happened. Say a customer has been followed for 12 months and is still subscribed. We don’t know when they’ll cancel, but we do know they went at least 12 months without canceling, and that information counts.
SECTION 02

A map for choosing a survival method

The main methods, sorted by your goal and by how the events are structured.

Time until an eventSurvival over timePlot and compare curvesKaplan–MeierLog-rank testRMSTEffects of covariatesOn the hazard or on timeCox regressionAFT & parametric modelsTime-varying/stratified CoxComplex eventsMultiple or repeat eventsCompeting risksMultistate & recurrentCure modelsAlways check: time zero · event definition · censoring · independence · model assumptions
Figure 2. Survival analysis method map

Treat this map as a starting point. The same data set can answer quite different questions: comparing survival rates is not the same job as studying risk factors. And when people can die from several causes, for example, you first have to ask whether it’s really fine to treat deaths from other causes as ordinary censoring.

SECTION 03

Describing survival or comparing groups

Methods for estimating survival curves and checking for differences between groups.

CASE 01

Showing the probability of surviving over time

Suppose you want to estimate what share of treated patients are still relapse-free at 6 months and at 12 months. Kaplan–Meier estimation takes censoring into account and gives you a survival curve.

Kaplan–Meier
CASE 02

Comparing survival curves across two or more groups

To check whether time to relapse differs between treatment A and treatment B, consider the log-rank test. If the curves cross or the proportional hazards assumption looks shaky, look at other ways of comparing them too.

Log-rank test
CASE 03

Comparing average event-free time over a fixed window

Say you want to compare how long two groups stay event-free over the same 24-month window. Restricted mean survival time (RMST) answers exactly that. The key is to fix the time limit in advance.

RMST
00.5106121824MonthsSurvival probabilityTreatment ATreatment BArea under curve = RMSTτ = 24 months
Figure 3. Survival curves and RMST (concept)
SECTION 04

Analyzing what drives survival time

Decide whether you want to explain the hazard or the survival time itself.

Research questionTypical methodCheck first
How are age and type of treatment related to the risk of the event?Cox proportional hazards modelProportional hazards assumption; how covariates are defined
How much does a given factor lengthen or shorten the time to the event?AFT modelFit of the chosen survival-time distribution
Do you want to model survival time as following a specific distribution?Parametric survival modelChoice of distribution and goodness of fit
Does medication use or exposure status change during the study?Cox with time-varying covariatesWhen the variable changed, and the order of events in time
Cox · hazard ratio (HR)Hazard × HRHazard differs by a constant multipleAFT · time ratio (TR)× TRTime axis stretches or shrinks
Figure 4. Hazard ratio vs. time ratio (concept)

A Cox hazard ratio and an AFT time ratio are different numbers, and you read them differently. Decide which kind of effect you want to describe before you pick a model.

SECTION 05

When the event structure gets complicated

Situations that go beyond the basic one-event setup.

Events competeCompeting risksRelapseDeathStates changeMultistateAdmittedDischargedReadmittedEvents repeatRecurrent eventsSome never have the eventCure modelLong-term event-free
Figure 5. Complex event structures (concept)
MORE THAN ONE EVENT TYPE

When events compete — competing risks analysis

Say you’re tracking cancer relapse, but some patients die of other causes before they ever relapse. One event can rule out another. Here you need to keep two things apart: the cumulative incidence of each event and its cause-specific hazard.

Competing risks
STATE TRANSITION

When subjects move through several states — multistate models

When subjects move from state to state (admitted → discharged → readmitted), you analyze the transitions between states together with the time each one takes.

Multistate model
REPEATED EVENTS

When the same event happens more than once — recurrent events models

Think of a customer who pauses a service several times, or a patient who keeps getting readmitted. Events in the same person tend to be related, and the model has to account for that.

Recurrent events modelShared frailty model
LONG-TERM NON-EVENT

When some subjects may never have the event — cure models

If there’s good reason to believe some subjects will never experience the event, even after long follow-up, a cure model is worth a look. Just don’t confuse this with events that haven’t shown up yet because follow-up was too short.

Cure model
SECTION 06

What should you check before running the analysis?

In survival analysis, the way time and events are recorded matters more than usual.

What to checkWhy it matters
Time zeroEveryone needs a comparable starting point, such as the start of treatment or the sign-up date.
Event definition and codingIf the event and censoring codes get swapped, the results will be wrong.
Nature of the censoringStandard methods assume, among other things, that censoring is noninformative. Find out why subjects were lost to follow-up.
Number of events and follow-up timeHow stable your estimates are depends not only on the number of participants but on how many events actually occurred and how long people were followed.
Model-specific assumptionsCheck the assumptions that go with your method: proportional hazards for Cox, distributional fit for AFT, and so on.
Recurrent and competing eventsAsk whether it’s really okay to lump several events in the same person, or different types of events, into a single event.
Define time zeroTreatment start · sign-up dateDefine the eventRelapse / cancellation = 1Code censoringFollow-up ended = 0Swap the codes and every result is wrong
Figure 6. Coding survival data, step by step
Watch out
When only a handful of subjects are left late in follow-up, the tail of a Kaplan–Meier curve can be unstable. Don’t read the curve on its own; also check the number at risk at each time point and the confidence intervals.
SECTION 07

All 12 survival methods at a glance

A quick look at what each method is for. The individual chapters explain how each one works and how to interpret it.

Survival curves & group comparisons

Risk factors & time models

Extended event structures

※ These 12 methods are the core options in survival analysis. Depending on your study design, other extensions, such as shared frailty models, may also be worth considering.

✓ KEY TAKEAWAYS

In survival analysis, sort out the events and the time structure first.

Before choosing a method, pin down four things: (1) time zero and the event definition, (2) censoring, (3) your research question, and (4) the structure of the events.

Decide whether you want to show time to event, compare groups, or explain risk factors. Kaplan–Meier and the log-rank test estimate and compare survival curves; Cox and AFT models estimate the effects of covariates. Then check for censoring and for competing or recurrent events, and the list of suitable methods gets much shorter. If there are several event types, or events that repeat, look to an extended model built for that structure.