- Introduced by
- David R. Cox
- Year
- 1972
- Type
- Semi-parametric survival regression
- Family
- Clinical / epidemiology
What does it do?
Retrospective Cox proportional hazards regression applies Cox's (1972) semi-parametric survival model to time-to-event data extracted from existing records, such as medical charts, administrative databases, registries, or biobanks.
It estimates covariate-adjusted hazard ratios (HRs) without specifying the underlying baseline hazard. It is a common choice when the investigator starts from outcomes and exposures that have already been recorded.
The intuition behind the method
Imagine a hospital administrator who wants to know which patient characteristics predict time to readmission, using five years of discharge records. Rather than running a prospective trial, the team extracts follow-up times and covariates from electronic health records and applies Cox regression. The model estimates, for each covariate, how much it multiplies the instantaneous risk of the event at any point in time, while leaving the baseline hazard curve entirely unspecified. Because the data already exist, the study is fast and inexpensive, but the investigator must accept whatever exposures and confounders happened to be recorded. Death before readmission is a competing event: a patient who dies cannot later be readmitted. If mortality is substantial in the cohort, the analysis would need a cause-specific or Fine-Gray competing-risks model rather than a single-event Cox model.
History
David Cox introduced the proportional hazards model in a 1972 paper in the Journal of the Royal Statistical Society, Series B. The hazard is modelled as a function of explanatory variables and unknown regression coefficients multiplied by an arbitrary, unknown function of time, and inference on the coefficients is based on a conditional likelihood. The model is also applied to retrospectively recorded data, where follow-up times and covariates are reconstructed from historical records. Extensions including time-varying covariates, frailty models, and cause-specific hazard frameworks have broadened its applicability.
When to use it
Use retrospective Cox regression when a time-to-event question must be answered quickly, and a prospective study is impractical because of time, cost, or ethical constraints, and when historical records contain reliable event dates and covariate data. It can suit outcomes with long latency, where prospective follow-up would take many years, provided enough events were recorded. Do NOT use it when the proportional hazards assumption is severely violated for key covariates without remediation; when the outcome is binary with no meaningful time dimension (use logistic regression instead); when survival times are interval-censored from grouped data (consider parametric or interval-censored models); when retrospective records are too incomplete or inconsistently coded to reconstruct accurate follow-up times; or when competing risks substantially change the interpretation (use Fine-Gray subdistribution hazard or cause-specific models instead).
Limitations and considerations
- Retrospective data quality is bounded by how the records were originally collected; unmeasured confounders cannot be adjusted for.
- Survivor bias and left truncation are common in retrospective designs and require explicit handling, for example with delayed entry models.
- The proportional hazards assumption may not hold over long follow-up periods without time-varying covariates or stratification.
- Precision is governed by the number of observed events rather than the total number of records. With few events relative to the number of covariates, estimates overfit and confidence intervals widen; a rule of 10 to 20 events per variable is a practical guideline.
- Causal inference is limited without a randomized comparison; propensity-score weighting or matching can partly address confounding but does not remove it.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Because the data already exist, the study can be completed without the time needed to enrol participants and follow them prospectively.
- The baseline hazard is left unspecified, so no parametric distribution for event times has to be assumed.
- Right-censored observations are handled directly: a participant who leaves follow-up before the event contributes the time observed at risk.
- The coefficients are reported as hazard ratios via exp(beta-hat), which give a direct reading of how each covariate scales the instantaneous event risk.
- Standard software packages (for example the R survival package, SAS PHREG, and Stata stcox) provide the model together with proportional hazards diagnostics.
Applications
- Identifying predictors of all-cause and cause-specific mortality in patients with a given diagnosis using hospital registry data.
- Evaluating the effect of a medication or surgical procedure on time to adverse event using claims or pharmacy records.
- Estimating cancer recurrence risk after first-line treatment in a tumor registry cohort.
- Investigating occupational or environmental exposures and time to chronic disease onset in administrative cohorts.
- Benchmarking institution-level readmission rates with covariate adjustment using discharge databases.
- Studying time-to-event outcomes in large biobank cohorts linked to national health records.
How it works
How it works
Identify and extract the retrospective data source — electronic health records, claims database, disease registry, or administrative file. Define the study cohort: inclusion and exclusion criteria, entry date (often date of diagnosis, surgery, or hospital admission), and the end of the follow-up window. Ascertain each participant's event or censoring status and the exact time elapsed.
Specify the primary time-to-event endpoint (e.g., death, relapse, readmission) and all covariates of interest. Because data were collected for purposes other than the study, assess completeness and consistency; apply multiple imputation or complete-case analysis for missing values and document the decision. Clarify whether competing risks exist that require a separate model.
Fit the Cox proportional hazards model via maximum partial likelihood. The hazard at time t for individual i is h(t) = h_0(t) exp(beta_1 x_1 + ... + beta_p x_p), where h_0(t) is the unspecified baseline hazard and the betas are log-hazard-ratio coefficients. Adjust for a priori confounders; avoid variable selection driven solely by significance to prevent overfitting.
Formula
h(t) = h_0(t) \exp(\beta_1 x_1 + \cdots + \beta_p x_p)
Verify the proportional hazards assumption for each covariate using Schoenfeld residuals and log-log survival plots. If a covariate violates proportionality, add a time-interaction term or stratify the baseline hazard. Check influential observations with dfbeta diagnostics and assess linearity of continuous predictors using Martingale residuals.
Report hazard ratios (HR = exp(beta-hat)) with 95% confidence intervals and p-values. An HR > 1 indicates higher instantaneous risk relative to the reference group; HR < 1 indicates lower risk. These interpretations assume proportional hazards: the HR is a constant ratio across follow-up time only if that assumption holds. If it fails for a covariate, report time-specific or stratified effects instead of a single HR. Because this is a retrospective design, discuss potential biases — information bias, time-varying confounding, left truncation, and survivor bias — alongside effect estimates.
Formula
HR = \exp(\hat{\beta})Common pitfalls
- Mixing up left truncation with immortal time bias. Left truncation (patients enter the records only after an earlier risk window) is handled by delayed entry, so each participant's time at risk starts at their entry time rather than at time zero. Immortal time bias is a separate problem: an exposure defined by a later event, such as a first prescription fill, must not credit the exposed group with person-time before that event. Both need explicit handling in retrospective records.
- Mechanically selecting covariates by stepwise p-value thresholds. This inflates Type I error and produces unstable models; prefer theory-driven covariate selection, confirmed by sensitivity analysis.
- Failing to test the proportional hazards assumption. Reporting HRs as a single summary when proportionality is violated is misleading; Schoenfeld residual tests and log-log plots should be checked and reported.
- Assuming censoring is non-informative without justification. Loss to follow-up, or censoring linked to prognosis, can leave those who remain systematically different from those who leave; if so, standard Cox estimates can be biased. End-of-study administrative censoring is usually non-informative, but this should be stated.
- Overlooking competing risks. In settings such as cancer mortality, death from other causes censors the event of interest but is not independent of it; a cause-specific or Fine-Gray model is then preferable.
Frequently asked questions
How is retrospective Cox regression different from a prospective Cox analysis?
The underlying statistical model and estimation procedure are identical; the distinction is in how data were collected. In a prospective design the investigator measures exposures and follows participants forward in time to observe events. In a retrospective design the investigator extracts already-recorded data, reconstructing follow-up times from historical dates. The retrospective variant is faster and cheaper but is more vulnerable to information bias, unmeasured confounding, and incomplete ascertainment of events and censoring times.
What is immortal time bias and how do I avoid it?
Immortal time bias occurs when the interval between the start of follow-up and the assignment of exposure status is incorrectly included in the exposed person-time. For example, if a drug exposure is defined by filling a prescription, patients must survive long enough to fill it, creating a spuriously lower event rate in the exposed group. Avoid it by using time-varying exposure coding or by setting the index date at the time of first exposure rather than at cohort entry.
How many events do I need for a reliable Cox model?
A common rule of thumb is 10 to 20 events per covariate included in the model (EPV rule). With fewer events the partial likelihood estimates become unstable and confidence intervals widen markedly. If the number of events is limited, reduce the covariate set to a theory-driven minimum, or apply penalized regression (ridge, LASSO) to shrink coefficient estimates.
When should I use Fine-Gray competing risks instead of Cox?
Use the Fine-Gray subdistribution hazard model when you are interested in the cumulative incidence of a specific event in the presence of competing events that preclude it — for example, disease-specific death when patients may also die from other causes. The cause-specific Cox model answers 'what drives the hazard among those still at risk?', while Fine-Gray answers 'what is the probability of experiencing this event by time t, accounting for competing events?' The choice depends on the scientific question.
Can I apply Cox regression to time-varying covariates in retrospective data?
Yes. When a covariate such as drug dose, blood pressure, or employment status changes over follow-up and those changes are recorded in the historical data, you can restructure the dataset into counting process format (start, stop intervals) and fit a Cox model with time-varying covariates. This is methodologically sound but requires that the covariate measurements were recorded at clinically meaningful time points in the source records.
Related methods
Sources
Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society, Series B, 34(2), 187–220.
Open DOI referenceCollett, D. (2015). Modelling Survival Data in Medical Research (3rd ed.). CRC Press.
ISBN: 978-1439856789