Statistical test in survival analysis · BEGINNER LESSON
Log-rank test
The log-rank test is a nonparametric statistical test used in survival analysis to compare the full survival experience of two or more independent groups. It asks whether the groups have the same survival distribution over time, while accounting for censored observations.
What it is and what it measures
Survival analysis studies time-to-event data, meaning the time until a defined event happens, such as death or another end point. The log-rank test is used to compare survival curves from two or more groups. It measures whether the groups differ in their survival distributions across the whole follow-up period, not at one chosen time point. It is nonparametric, so it does not assume a particular shape for the survival curve or hazard function. A survival curve is often estimated first with the Kaplan-Meier method, then compared with the log-rank test.
[1] Survival Analysis - StatPearls - NCBI Bookshelf - NIH [2] Survival Analysis and Interpretation of Time-to-Event Data - PMC - NIH [3] Survival analysis: A primer for the clinician scientists - PMC
How it works
The test compares the observed number of events in each group with the number expected if the null hypothesis were true. The null hypothesis says there is no difference in survival between the groups, or equivalently that the survival curves are identical. Because it uses the full follow-up history, it can compare groups when some observations are censored. Censoring means the exact event time is unknown, usually because follow-up ends before the event happens or a person leaves the study early.
[1] Survival Analysis - StatPearls - NCBI Bookshelf - NIH [2] Survival Analysis and Interpretation of Time-to-Event Data - PMC - NIH [3] Survival analysis: A primer for the clinician scientists - PMC
When it is useful
The log-rank test is commonly used when researchers want a crude, unadjusted comparison of survival between groups such as treatment groups or prognostic categories. It is especially useful when there are censored observations, because ordinary tests that ignore follow-up time do not handle time-to-event data well. It compares the entire survival experience rather than a single summary number.
[1] Survival Analysis - StatPearls - NCBI Bookshelf - NIH [2] Survival Analysis and Interpretation of Time-to-Event Data - PMC - NIH [3] Survival analysis: A primer for the clinician scientists - PMC
Limitations
The log-rank test cannot estimate the size of the difference between groups, and it cannot adjust for other variables that may affect survival. It also has low power when survival curves cross, because one group may do better early and worse later. Reports should state that the whole survival distribution was tested, not just a specific time such as 5-year survival. For adjusted comparisons, a Cox proportional hazards model is used instead.
[1] Survival Analysis - StatPearls - NCBI Bookshelf - NIH [2] Survival Analysis and Interpretation of Time-to-Event Data - PMC - NIH [3] Survival analysis: A primer for the clinician scientists - PMC
SEE THE IDEA
How the log-rank test compares survival groups
Each subject is followed until an event or until the person is censored.
A separate survival curve is estimated for each group.
The test checks whether the number of events in each group matches what would be expected if the groups were the same.
A statistical result indicates whether the survival distributions differ over the whole follow-up period.
A survival comparison starts with group curves and ends with a hypothesis test across all observed follow-up times.
The log-rank test compares complete survival experience, not one time point.
TRY IT YOURSELF
Test your understanding
Choose an answer, then check the explanation.
PUT IT TOGETHER
Match each concept to its meaning
Drag a label onto its description, or select a label and then select a description. This also works with a keyboard.
4 pairs to match
Sources and further reading
This general lesson was generated from public source material. It explains a concept; it does not interpret a private paper or provide medical advice.