Skip to content
Study aid only. Verify against current guidelines before clinical use.
Step 1 · Biostatistics & Epidemiology

Survival Analysis & Regression Models

From stepped survival curves to choosing the right model

Biostatistics & Epidemiology·Statistical Analysis·5 min read·9 high-yield points·Reviewed by Veli Bakalov, MD @HemeOncBuddy
Study materialsNo account needed
Card deckActive-recall cards · quick checks · quiz

Kaplan-Meier survival curves

Product-limit method. The Kaplan-Meier curve plots the proportion of subjects still event-free over time. It stays flat between events and drops in a vertical step at each event time by the fraction of at-risk subjects who had the event: new survival = prior survival × (1 − events ÷ number at risk). Survival at any time is therefore the running product of these conditional probabilities. The "event" can be death, relapse, or any other defined endpoint.

Censoring. Censored subjects are those lost to follow-up, withdrawn, or still event-free when the study ends. They appear as tick marks on flat segments: they leave the risk set without causing a drop and contribute follow-up time only until their last contact. They are neither counted as events nor discarded: their event-free time is kept, and they simply stop appearing in later denominators. The method assumes censoring is noninformative, meaning censored patients have the same outlook as those still being followed.

Reading a Kaplan-Meier plot
What you seeWhat it means
Vertical step downOne or more events (death, relapse) at that time
Tick mark on a flat segmentA censored subject who left without an event
Curve crosses 0.5Median survival: read straight down to the time axis
Curve never reaches 0.5Median survival "not reached"
Numbers-at-risk table under the axisHow many patients support each part of the curve; the late tail rests on few and is imprecise

Median survival. Draw a horizontal line from 0.5 (50% event-free) to the curve and drop to the time axis. The horizontal distance between two curves at 0.5 is the difference in median survival; that reading alone gives neither relative mortality nor a hazard ratio. The median is reported instead of the mean because survival times are skewed and censored subjects have no known event time.

Comparing curves: log-rank test and Cox regression

Log-rank test. Compares observed with expected events in each group at every event time across the whole follow-up and returns a single p-value for whether two or more survival curves differ. It is nonparametric, gives no effect size, and cannot adjust for covariates. To adjust a survival comparison for age, stage, or performance status, move to Cox regression.

Cox proportional hazards regression. Models time-to-event data, including censored observations, with several covariates at once (treatment, age, stage) and outputs adjusted hazard ratios. The hazard is the instantaneous event rate among those still at risk, so the HR is a ratio of event rates at any given moment. It is a relative measure, not an absolute risk.

HR 0.7030% lower event rate at any given time
HR 1.550% higher event rate
HR 1no difference; a 95% CI that includes 1 is not significant

Proportional hazards assumption. Cox assumes the HR stays constant throughout follow-up, so the curves separate steadily and never cross. Crossing Kaplan-Meier curves, as with surgery that causes early operative deaths but later benefit, violate the assumption: a single HR averages early harm with late benefit and is misleading. Time-varying terms or separate HRs for each period are needed. Cox regression is semiparametric: it estimates the HRs without specifying the shape of the underlying baseline hazard.

Choosing a regression model

The outcome picks the model. The type of dependent variable (Y) determines the regression; predictors (X) can be continuous or categorical in any of them.

Match the outcome to the model
OutcomeExampleModelReported asNo effect
ContinuousSystolic BP, LDLLinear regressionβ coefficientβ = 0
BinaryMI yes/no; disease present or absentLogistic regressionAdjusted odds ratioOR = 1
Time to event, with censoringOverall survival, time to relapseCox proportional hazardsAdjusted hazard ratioHR = 1
A 95% CI that crosses the no-effect value (0 for β, 1 for ratios) means the result is not statistically significant.

Linear regression. Fits Y = β0 + β1X1 + β2X2 + …. Each β is the expected change in the continuous outcome per 1-unit increase in that predictor, holding the others constant. A β of 2.5 for BMI means systolic BP is 2.5 mm Hg higher per kg/m². A β whose 95% CI includes 0 is not significant.

Logistic regression. Models the log-odds of a binary outcome; exponentiating a coefficient gives an odds ratio adjusted for the other covariates. An OR of 2.0 for smoking means twice the odds of disease at the same age and sex. It is the standard multivariable tool for case-control data, where incidence, and so risk, cannot be measured directly. The OR approximates the relative risk only when the outcome is rare (roughly under 10%); for common outcomes it overstates the RR.

Linear, logistic, and Cox models adjust only for confounders that were measured, and measured accurately. Unmeasured and residual confounding remain, so an adjusted association is still not proof of causation. Only randomization balances unknown confounders.

Correlation

Pearson correlation coefficient (r). Ranges from −1 to +1. The sign gives the direction and the magnitude gives the strength of the linear relationship; 0 means no linear relation, and a strong curved relationship can still give r near 0. It is parametric and assumes continuous, roughly normally distributed variables. The sign carries no information about strength: r = −0.7 and r = +0.7 are equally strong.

Spearman rank correlation (ρ). The nonparametric alternative. It correlates ranks, so it suits ordinal or skewed data, resists outliers, and captures any monotonic relationship (one that consistently rises or falls), not just a straight line.

Pearson vs Spearman
FeaturePearson rSpearman ρ
TypeParametricNonparametric (ranks)
DataContinuous, roughly normalOrdinal, skewed, or outlier-prone
Relationship capturedLinear onlyAny monotonic
ExampleHeight vs weightOrdinal symptom grade vs a skewed count

Coefficient of determination (r²). The proportion of the variability in Y explained by X. An r of 0.6 gives r² = 0.36: 36% is explained and 64% reflects other factors.

What r cannot tell you.

  • r is unitless and says nothing about slope: a nearly flat line and a steep line can both give r = 0.9. The slope comes from the regression β.
  • Correlation does not establish causation.
  • A single extreme point can manufacture a strong r from a shapeless cloud or hide a real association, so always inspect the scatterplot.

Anscombe's quartet: four data sets with nearly identical r and regression lines but strikingly different scatterplots, a reminder to plot the data.