Statistically analyze survival times

Statistical analysis of survival times

At the last follow-up, one patient is event-free, another withdraws from the study prematurely, and a third experiences the defined event after six months. At this point, simply comparing means is no longer sufficient. Anyone who wants to statistically analyze survival times must take into account that observation times vary and that many events do not occur before the end of the study. A correctly planned survival analysis makes this information interpretable—and protects your thesis, dissertation, or publication from methodological misinterpretations.

What is really measured in survival analysis

The term survival time does not exclusively refer to the time until death. In medical studies, it may refer to the time until recurrence, progression, discharge, a cardiovascular event, or discontinuation of therapy. In other fields, relevant endpoints include the time until termination, machine failure, or study dropout.

Three pieces of information are always crucial: the start time, the clearly defined event, and the duration of observation. The start may be, for example, the diagnosis, randomization, or the beginning of treatment. The event must be precisely operationalized in a professional manner. Vague definitions such as “clinical deterioration” quickly lead to non-reproducible analyses.

The special feature lies in censoring. If no event is documented for a person at the end of the study, this does not mean that they will never experience an event. All that is known is that it has not occurred by the last contact. These right-censored cases contain relevant information and must be treated neither as events nor as missing values. This is precisely what survival analysis methods were developed for.

Statistically analyzing survival times: Choosing the right method

Which method is appropriate depends on the research question, the endpoint, and the study design. The most common methods build on one another but answer different questions.

Kaplan-Meier curves for descriptive trends

The Kaplan-Meier method estimates the probability of remaining event-free over a specific period. The result is usually presented as a step function. Each step occurs at an event time, and censored observations are often made visible by small marks on the curve.

In a medical paper, this can show, for example, how recurrence-free survival develops over 12, 24, or 60 months. The estimated median survival time is only meaningfully interpretable if the curve actually reaches the 50-percent mark. If this mark is not crossed, the professionally correct statement is not “Median = 0,” but rather: The median was not reached during the observation period.

Kaplan-Meier curves are excellent for description. However, they do not automatically control for age, sex, baseline severity, or other influencing factors. As soon as such covariates are relevant, a purely graphical comparison is usually insufficient.

Log-rank test for a simple group comparison

If two or more groups are to be compared, such as therapy A versus therapy B, the log-rank test is a classic first step. It tests whether the survival curves differ statistically over the observed period.

However, a significant p-value shows neither the clinical magnitude of a difference nor takes confounding factors into account. Furthermore, the standard log-rank test weights differences over the entire time span. If the curves diverge only late or cross, another test or a more nuanced model may be more appropriate. Therefore, the test should never stand alone next to a graphic but should be reported together with effect measures and confidence intervals.

Cox regression for adjusted effects

Cox proportional hazards regression is the central method when the influence of multiple variables on the event rate is to be examined. It typically provides hazard ratios with 95-percent confidence intervals. A hazard ratio of 1.40 means, for example, that the estimated instantaneous event rate in one group is 40 percent higher than in the reference group—taking into account the covariates included in the model.

This wording deserves careful consideration: A hazard ratio is not a direct risk over the entire study period, nor is it a statement about individual causality. Its interpretation depends on the study design, the coding of the variables, and the set of adjustments. Especially with retrospective data, the selection of control variables should be professionally justified and not based solely on automated selection procedures.

Assumptions determine reliability

A formally correctly calculated Cox regression can still be unsuitable. The most important assumption is the proportionality of the hazards. Simply put: the ratio of event rates between groups should remain approximately constant over time. If Kaplan-Meier curves cross clearly or effects change strongly over time, this assumption may be violated.

Depending on the research question, time-dependent covariates, stratified Cox models, separate time intervals, or alternative modeling approaches may then be appropriate. Which solution is suitable is not a purely software decision. It must fit the medical or professional logic of the study.

Independent censoring is also relevant. If participants, for example, drop out of follow-up particularly frequently due to deterioration, the assumption of random censoring is questionable. In such cases, the survival probability may be overestimated. A careful description of dropouts and follow-up processes is therefore part of the analysis, not merely a formality.

Another critical point is competing risks. If a person dies before a possible recurrence, they can no longer experience a recurrence. Death is then not a normally censored case, but a competing event. Classic Kaplan-Meier estimates can overestimate the probability of the event of interest under such conditions. Here, cumulative incidence functions and appropriate regression models are often the better choice.

Data preparation: The most common source of later errors

Many problems arise before the first curve is drawn. For each person, you need at least a unique ID, a time variable, an event indicator, and the relevant group or covariate variables. The event indicator must be transparently coded, for example, 1 for an event and 0 for censored. Especially with merged datasets, serious mix-ups can occur here.

Also check whether negative or unrealistic times occur, whether the start and end dates are consistent, and whether multiple events occur per person. For recurring events such as repeated hospitalizations, a classic analysis of the time until the first event is only one possible perspective. It can be useful, but it does not answer the same question as a model for repeated events.

Before modeling, a table should clearly describe the sample: number of persons, number of events, proportion of censored cases, median follow-up time, and distribution of key covariates. The median follow-up time is not simply the median of all observed times. Depending on the reporting goal, it should be estimated using a suitable method to appropriately reflect the actual observation duration.

How to report results with scientific rigor

Good reporting explains not only whether a result is significant, but also exactly what was estimated. First, state the endpoint, the start of the time measurement, the censoring rule, and the observation period. This is followed by event numbers, Kaplan-Meier estimates at clinically or professionally relevant time points, and, in the case of group comparisons, the log-rank test.

For a Cox regression, hazard ratios, 95-percent confidence intervals, and p-values should be included in a clear table. Add which variables were adjusted and how categorical reference groups are defined. Statements such as “age was significant” are too imprecise. Better is a substantive interpretation per defined unit, for example per ten years of life, provided this scaling is professionally meaningful.

Graphics should remain readable. A Kaplan-Meier curve requires a labeled time axis, a clearly named y-axis, a legend, and, ideally, a risk table below the graphic. With small sample sizes late in the follow-up, curves can look dramatic, even though only a few people are still under observation. The risk table prevents such overinterpretations.

When professional statistical advice is particularly useful

For simple data, a Kaplan-Meier analysis in R, SPSS, Stata, or Python can be quickly created. It becomes challenging when multiple endpoints, incomplete follow-up data, competing risks, small event numbers, or complex adjustments are involved. Then the methodological planning determines whether the results are publishable and professionally defensible.

Consultation by PhD statisticians can provide clarity even before data analysis: Which endpoint is primary? How is censoring defined? Is a group comparison sufficient, or is an adjusted Cox regression required? Which sensitivity analyses are appropriate? At Easy Statistik, researchers receive an individual, confidential assessment of their research question, as well as transparent analyses and support with reporting—tailored to a thesis, dissertation, or manuscript.

If your survival data are already available, do not wait until just before submission to make these decisions. Describe your research question and study design via the contact form. A methodologically sound analysis creates not only a p-value, but also the assurance that your conclusions are actually supported by the data.


Put knowledge into practice

From explanation
to your own analysis.

Would you like to know which method suits your project? We review your plans free of charge and give you a clear recommendation.

Your question deserves a personal answer.

Describe your project. We will assess free of charge what support would be right for you.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.