Time-to-event analysis methods including censoring, Kaplan-Meier estimation, log-rank test, Cox proportional hazards modeling, competing risks, and landmark analysis.
Censoring occurs when the exact event time is unknown for some participants. Proper handling of censoring is what distinguishes survival analysis from other methods.
The event has not occurred by the time of last observation. Reasons:
Assumption: censoring is non-informative (independent of the event process). If participants are censored because they are doing worse (or better), estimates are biased.
The event occurred before observation began, but the exact time is unknown. Example: a screening study detects prevalent disease — disease onset preceded the screen.
The event is known to have occurred within a time interval but the exact time is unknown. Example: a tumor detected at a scheduled visit occurred between the prior visit and the current one. Requires specialized methods (Turnbull estimator, interval-censored Cox model).
All participants censored at the study end date. Non-informative by design (independent of prognosis).
Censoring related to the outcome — a serious threat to validity. Examples: sicker patients drop out, healthier patients transfer care. Use sensitivity analyses (worst-case imputation, IPCW) to assess impact.
The KM estimator is a non-parametric method to estimate the survival function S(t) = P(T > t).
At each event time t_i:
S(t) = product of (1 - d_i/n_i) for all t_i <= t
Non-parametric test comparing survival distributions between groups. Tests the null hypothesis that survival functions are identical.
At each event time, compare observed vs expected events in each group (based on the number at risk). Sum across all event times:
Chi-square = (sum(O - E))^2 / sum(V)
where V is the variance. Approximately chi-squared distributed with k-1 degrees of freedom (k = number of groups).
Computes the test within strata and combines. Controls for confounders without modeling. Used as the primary analysis in many RCTs (stratified by randomization strata).
h(t | X) = h_0(t) * exp(beta_1X1 + beta_2X2 + ... + beta_k*Xk)
Important caveat: HR is a relative measure of the rate. It does not directly translate to survival probabilities without knowing the baseline hazard. Two trials with the same HR can have very different clinical implications depending on baseline event rates.
The PH assumption states that the hazard ratio is constant over time — the survival curves for different groups should have a consistent proportional relationship.
Testing the PH Assumption:
Schoenfeld residuals — regress scaled Schoenfeld residuals against time for each covariate. A significant correlation indicates PH violation. Plot residuals vs time; a flat (zero-slope) line supports PH.
Log-log plot — plot log(-log(S(t))) vs log(t) for each group. Parallel curves support PH. Crossing or converging curves indicate violation.
Time-dependent covariate — include an interaction between the covariate and time (or log(time)) in the model. If significant, PH is violated.
Goodness-of-fit test — Grambsch-Therneau global test based on Schoenfeld residuals.
When PH Is Violated:
For predictors that change value during follow-up (e.g., blood pressure, treatment changes):
Standard KM and Cox methods treat competing events as censoring. This is only appropriate if the competing event is independent of the event of interest (often implausible). If a patient dies of cardiovascular disease, they can no longer experience cancer — their risk of cancer is effectively eliminated.
Addresses immortal time bias and time-dependent classification.
The problem: if patients are classified by a post-baseline event (e.g., response to treatment at 3 months), those who died before 3 months could never have been classified as responders, creating a guarantee of survival (immortal time) that biases the responder group.
A modified KM that accommodates time-dependent group membership, but has its own limitations and is less commonly accepted.
A common and pernicious bias in observational survival studies. Occurs when the period between cohort entry and exposure classification is guaranteed to be event-free (the patient must survive long enough to receive the treatment or be classified).
Classic example: patients who receive an organ transplant vs those who do not. Transplant recipients survived long enough to receive the transplant — this survival time is "immortal" and biases in favor of the transplant group.
Solutions: