The Cox proportional hazards model is a survival analysis model that relates the timing of an event to explanatory variables. Introduced by David R. Cox in 1972, it describes how covariates multiply the instantaneous event rate among individuals who have not yet experienced the event. Its distinctive feature is that regression coefficients can be estimated without specifying the baseline event-rate function. The model is therefore called semiparametric: it combines a finite-dimensional regression component with an unspecified function of time.
The model is widely used in epidemiology, clinical research, reliability analysis, and econometrics. Outcomes include time to death, disease recurrence, equipment failure, employment transitions, and loan default. Its methods accommodate incomplete follow-up, but valid interpretation depends on the observation process, the construction of risk sets, and assumptions about how covariate effects behave over time.
The central output is usually a hazard ratio, not a probability ratio or a ratio of survival times. Estimation proceeds through a partial likelihood built from comparisons at observed event times. Absolute event probabilities require an additional estimate of the baseline hazard. Extensions address changing covariates, nonproportional effects, clustering, recurrent events, and competing outcomes.
Model specification and the proportional hazards assumption
Let be a nonnegative event time. Its survival function is . For a continuously distributed event time, the hazard function is
The hazard is a rate conditional on remaining event-free, not the probability of experiencing the event at exactly time . If time is measured in years, the hazard has units of inverse years. With density , it satisfies . The cumulative hazard is , and .
For a vector of fixed covariates , the Cox model specifies
where is the baseline hazard and is a vector of regression coefficients. The exponential function keeps the fitted hazard nonnegative while allowing the linear predictor to take any real value. The baseline hazard describes the covariate reference profile , which need not represent a typical or even physically possible individual. Centering covariates changes this reference profile and the associated baseline, but not the fitted hazard ratios.
For two profiles and ,
The absence of on the right is the proportional hazards assumption. For a one-unit increase in , holding other covariates fixed and assuming no relevant interaction, the hazard ratio is . A hazard ratio of means a 50% higher instantaneous event rate among those still event-free at the same time. It does not mean that 50% more individuals will eventually experience the event.
Proportional hazards does not imply a constant hazard. The baseline may increase, decrease, or vary irregularly; the assumption concerns relative hazards. A constant baseline produces an exponential survival distribution, whereas a suitable power-shaped baseline gives a Weibull proportional hazards model. The Cox formulation leaves this shape unspecified.
There is ordinarily no separately identifiable intercept: multiplying by a constant has the same effect as adding a constant to the linear predictor. Continuous predictors also need not act linearly. Transformations, spline terms, and interactions can enter the predictor while retaining proportional hazards, provided their coefficients do not change with time. Linearity in a recorded covariate and proportionality over time are therefore distinct modeling assumptions.
Censoring, truncation, and the construction of risk sets
Time-to-event data are often incompletely observed. Under right censoring, the event time is known only to exceed a censoring time. For individual , the recorded data commonly include
together with covariates . Here is the censoring time and indicates whether the event was observed. Study closure, withdrawal, and loss to follow-up can all generate right censoring, but they need not have the same implications for inference.
Standard Cox analysis requires an appropriately noninformative censoring mechanism. A common sufficient formulation is conditional independence of event and censoring times given the modeled covariates. More generally, the observed at-risk process must preserve the specified event intensity conditional on the available history. Censoring may depend on measured predictors without invalidating the analysis when those predictors are handled appropriately. Dependence on unmeasured prognostic factors can invalidate this condition.
The risk set at an event time contains the individuals who are under observation and still event-free immediately before that time. For ordinary right-censored data, it is
subject to the convention used for coincident censoring and event times. A censored individual contributes comparisons before censoring but contributes no observed event at the censoring time. Consequently, censored observations are not discarded, nor are their censoring times treated as failures.
Left truncation, also called delayed entry, is different. An individual enters observation at time only after remaining event-free until that point. Using the counting-process interval convention , the risk set becomes
For example, when attained age is the time scale, a participant recruited at age 60 must not contribute person-time to risk sets at age 50. Treating that participant as observed before recruitment can distort both the composition of risk sets and the estimated association.
The choice of time origin and time scale defines the comparisons being made. A model using time since enrollment compares participants with equal follow-up duration; a model using attained age compares participants at equal ages. Age can be included as a covariate in the first approach, but that is not generally equivalent to using age as the underlying time scale.
Interval censoring requires further methods because the event is known only to lie between examination times. The ordinary Cox partial likelihood assumes that event ordering is available with sufficient precision. Substituting interval midpoints is an approximation that can alter the ordering and estimated effects; it is not the standard interval-censored likelihood.
Partial likelihood and risk-set comparisons
The defining estimation method is partial likelihood. Suppose initially that event times are distinct, and let denote the individual who experiences the event at observed event time . Conditional on the risk set and on one event occurring at that time, the model gives the relative contribution
The common baseline hazard cancels. Multiplication over the observed events produces
The corresponding log partial likelihood is
Each factor compares the covariates of the individual who experienced the event with those of everyone eligible to experience it at that instant. An individual may therefore appear in many denominators before experiencing an event or leaving observation. The same person’s repeated appearance is part of the method, not an assumption that those appearances are independent observations.
Partial likelihood is not the complete likelihood of all event and censoring times. It isolates information about relative hazards while avoiding a parametric specification of the nuisance baseline. Under suitable regularity and observation assumptions, maximizing it yields consistent, asymptotically normal estimates. In the standard semiparametric proportional hazards setting, the estimator also has an important efficiency property: it attains the appropriate semiparametric information bound.
For a simple illustration, suppose three people remain at risk, with one binary covariate taking values . If the person with value 1 experiences the next event, the contribution is
If a person with value 0 instead experiences it, that individual’s contribution is . Across many risk sets, the estimate balances whether observed failures occur disproportionately among people with larger fitted relative hazards.
The partial likelihood uses event ordering and risk-set membership rather than the numerical spacing between distinct event times. A strictly increasing transformation of time that preserves ordering and risk sets leaves the coefficient estimate unchanged. Baseline hazard estimates and predicted survival times do change with the time scale. Delayed entry, time-dependent predictors, and tied observations require additional care because their coding can affect which comparisons are available.
Numerical estimation, uncertainty, and tied event times
Differentiating the log partial likelihood gives its score,
where
Thus, estimation seeks coefficients for which observed event covariates balance their risk-set-weighted counterparts. The negative Hessian is a sum of weighted within-risk-set covariance matrices. Software commonly uses Newton–Raphson iterations or related algorithms to locate the maximum. Log-sum-exp calculations and centering can reduce overflow and other numerical stability problems when linear predictors are large.
Under standard assumptions, the inverse observed information estimates the covariance matrix of . An approximate 95% confidence interval for a single hazard ratio is
Wald, score, and partial-likelihood-ratio tests provide related forms of hypothesis testing. They agree asymptotically under regular conditions but can differ substantially in small or sparse samples. With a single binary group indicator, the score test at zero effect corresponds to the standard log-rank test in the usual two-group setting.
Tied event times arise when recording resolution is coarse or several events genuinely occur together. Let be the event set at time , with , and define
The Breslow approximation contributes
Efron’s approximation instead uses
It progressively removes fractions of the tied failures’ total risk score and is often more accurate for rounded continuous event times.
An exact conditional method compares the observed failure subset with all subsets of size from the risk set. Its denominator is
This can be computationally demanding. “Exact” also refers to a particular conditional treatment of ties, not to universal exact inference for every mechanism producing simultaneous events.
Finite coefficient estimates are not guaranteed. If covariates nearly perfectly order failures within risk sets, the partial likelihood may keep increasing as a coefficient diverges. Such monotone-likelihood behavior resembles separation in logistic regression. Penalization can stabilize estimation. For clustered observations, a sandwich variance estimator can account for within-cluster dependence under suitable conditions, but it does not repair an incorrectly specified mean hazard relationship.
Baseline hazard estimation and absolute prediction
Although estimating does not require specifying , absolute prediction requires an estimate of its cumulative form. A common choice is the Breslow estimator,
It is a step function with jumps at observed event times. For a fixed covariate profile,
Equivalently, writing ,
Implementations may use baseline estimators adjusted to their treatment of ties. They may also report a baseline centered at sample covariate values rather than at zero, so the reference profile matters when reconstructing predictions.
These formulas explain why a hazard ratio does not determine an absolute risk difference. Suppose one profile has twice another’s hazard. If the lower-hazard profile has survival probability at a specified time, the higher-hazard profile has survival under the model. The corresponding event probabilities are and , giving a risk ratio of , not . At a later time when lower-hazard survival is , higher-hazard survival is , and the event-probability ratio is .
Uncertainty in predicted survival comes from both coefficient estimation and baseline hazard estimation, including their dependence. Confidence bands or intervals that treat the estimated baseline as fixed omit part of this uncertainty. Large-sample transformations and bootstrap methods are used to construct prediction intervals for survival probabilities and related summaries.
The median survival time is the first time at which the estimated survival curve reaches or falls below . It may not be estimable if the curve never reaches that level during observed follow-up. A related quantity is restricted mean survival time,
which summarizes expected event-free time up to a specified horizon . It is expressed in time units rather than as a relative rate.
Prediction performance has several dimensions. Calibration concerns agreement between predicted and observed event probabilities, while discrimination concerns the ordering of individuals by outcome risk. Concordance measures assess ranking; censoring-adjusted Brier scores assess probability prediction error at specified times or over an interval. A model can rank individuals well yet systematically overestimate their absolute event probabilities.
Because the baseline hazard is unspecified, the ordinary Cox model does not supply a principled hazard shape beyond the observed event range. Keeping the estimated cumulative hazard flat after the last event is a computational convention, not evidence that future hazard is zero. Long-term extrapolation requires additional assumptions, such as a parametric tail model.
Diagnostics and departures from proportional hazards
Model checking separates several questions: whether covariate effects are constant over time, whether continuous predictors have suitable functional forms, whether unusual observations dominate estimation, and whether predicted probabilities fit the data. Passing one type of diagnostic does not establish the others.
Schoenfeld residuals are central to assessing proportional hazards. At an untied event time, the residual vector is
Under a correctly specified proportional hazards model, these event-specific discrepancies should not exhibit a systematic time trend. Scaled versions support plots and tests against transformed event time. Grambsch and Therneau’s 1994 development connected such diagnostics to time-varying coefficient alternatives. A trend can indicate that an estimated effect strengthens, weakens, or reverses during follow-up.
Another diagnostic follows from
For groups differing only in fixed covariates, plots of log-minus-log survival against a common time scale should have similar shapes with approximately constant vertical separation. Such plots can be difficult to interpret with sparse data or substantial covariate imbalance. Clearly crossing population survival curves are incompatible with a simple two-group proportional hazards model with a nonzero constant effect, but noisy empirical curves can cross even when the underlying model is reasonable.
Martingale residuals compare observed and fitted event accumulation. In the basic right-censored setting,
They can reveal nonlinear covariate relationships but are highly asymmetric. Deviance residuals transform them into a more balanced scale for identifying observations with unexpectedly early or late events. Influence measures examine how individual records or clusters affect coefficients. An influential observation may be erroneous, unusual, or simply highly informative; the diagnostic alone does not distinguish these possibilities.
Functional-form assessment is separate from proportionality. A predictor may have a curved but time-constant association with log hazard. Replacing a straight-line term by a spline can address that issue without introducing time-varying coefficients. Conversely, a predictor can have a linear effect at every instant while its slope changes over time. Interactions between covariates raise a third question: whether one predictor’s association depends on another.
Tests have limited sensitivity with few events and can detect small, practically unimportant departures in very large datasets. Graphical patterns, uncertainty, and the scientific time horizon therefore affect interpretation. Furthermore, when hazards are not proportional, a fitted constant Cox coefficient generally becomes a weighted summary of changing effects. Its weighting depends on event occurrence, risk-set composition, and censoring. Consequently, studies with different follow-up or censoring patterns can estimate different constant hazard ratios even when they share the same underlying time-varying relationship.
Time-varying covariates, stratification, and dependent events
An extended Cox model allows covariates to change over time:
where represents information available immediately before . Records are commonly organized into start–stop intervals over which covariates remain constant. At each event time, the risk-set calculation uses each individual’s current covariate values. Merely splitting a record into intervals does not create additional independent individuals.
A time-varying covariate is not the same as a time-varying coefficient. In the former, changes but remains fixed. In the latter, an association changes with time, for example
For a binary , the resulting hazard ratio is . Possible choices for include an indicator for a later follow-up period, log time on an appropriate domain, or a spline basis. These models replace a single constant effect with an explicitly time-indexed association.
Correct temporal coding is essential. If an exposure begins after follow-up starts, assigning the person to an “ever exposed” category from baseline uses future information. The period during which the individual had to remain alive or event-free to become exposed can then be misclassified as exposed time, producing immortal time bias. Updating exposure at its actual occurrence addresses this particular coding problem, although it does not by itself remove confounding.
A stratified Cox model takes the form
where denotes a stratum. Each stratum has its own baseline hazard, while regression coefficients are shared. The partial likelihood is a product of within-stratum contributions. Stratification can accommodate a categorical variable whose baseline hazards are not proportional, but it does not estimate a common hazard ratio for that stratifying variable. A stratum with no observed events supplies no event contribution to the coefficient likelihood.
Frailty models instead introduce latent heterogeneity, often through a multiplicative random effect shared by members of a cluster. They can represent dependence among related individuals or repeated events within a person. Their coefficients usually have a conditional interpretation given frailty; the corresponding population-averaged hazard ratio need not remain proportional after the frailty is integrated out.
For recurrent events, the Andersen–Gill formulation models a counting process over total follow-up time, while Prentice–Williams–Peterson models condition risk sets on previous event occurrence and can use total time or gap time. The distinction changes who is eligible for each event and what the coefficients describe. Robust standard errors can accommodate certain dependence patterns, but the event-history model still needs to reflect the intended comparison.
Competing risks, selection, and causal interpretation
A competing risk is an event that prevents the event of interest from occurring in the same initial state. For example, death from one cause precludes a later first death from another cause. A cause-specific Cox model specifies
for cause , among individuals who remain free of every event type. Computationally, other event types remove individuals from the risk set at their occurrence.
This cause-specific hazard is an observable feature of the competing-event process. Its estimation does not require independence between hypothetical latent failure times for the different causes. However, interpreting the result as survival in an imagined world where competing causes were eliminated requires additional assumptions and is generally not justified by the cause-specific model alone.
The probability of experiencing cause by time is its cumulative incidence,
where is survival free of all event types. With continuous hazards,
Thus, cumulative incidence depends on all cause-specific hazards. A covariate can increase the hazard for one cause yet have a smaller, absent, or reversed association with that cause’s cumulative incidence if it strongly affects competing events. The Fine–Gray model, introduced in 1999, models a subdistribution hazard related directly to cumulative incidence, using a modified risk-set construction. Its coefficients have a different interpretation from cause-specific Cox coefficients.
A fitted hazard ratio is also not automatically a causal effect. In observational data, confounding, measurement error, and selection bias may produce associations unrelated to an intervention. Even in a randomized controlled trial, the instantaneous hazard comparison at a later time conditions on post-randomization survival. The surviving groups can differ in prognostic composition because treatment has affected who remains event-free.
Hazard ratios are generally noncollapsible: a covariate-adjusted hazard ratio need not equal an unadjusted one even when the covariate is not a confounder. This distinguishes a change caused by conditioning from a change that necessarily demonstrates confounding. Individual-level heterogeneity can also generate changing marginal hazard ratios despite proportional hazards within homogeneous subgroups.
Causal inference therefore requires an explicitly defined intervention and estimand, together with assumptions such as exchangeability, positivity, and consistency. When time-varying confounders are affected by earlier exposure, ordinary time-dependent Cox adjustment may not estimate the intended causal effect. Weighting approaches and other longitudinal causal methods address different assumptions and targets; they do not convert every hazard ratio into a causal quantity. Survival-probability contrasts and restricted mean survival differences often answer different questions from conditional hazard ratios.
Historical development and contemporary use
Cox introduced the model in the 1972 paper Regression Models and Life-Tables, published in the Journal of the Royal Statistical Society, Series B. Earlier survival methods included life tables, the Kaplan–Meier estimator introduced in 1958, parametric lifetime distributions, and rank-based comparisons between groups. Cox’s construction supplied a flexible regression framework for multiple covariates while retaining an unspecified baseline hazard. His 1975 paper Partial Likelihood placed the estimation principle in a broader statistical setting.
Subsequent development established both practical refinements and mathematical foundations. Breslow’s 1974 work developed methods for covariance analysis of censored survival data, and Efron’s 1977 work examined partial-likelihood efficiency and supplied the widely used approximation for ties. Counting-process and martingale methods made it possible to treat delayed entry, changing covariates, and more general event histories within a common framework. Andersen and Gill’s 1982 formulation was especially influential in the asymptotic theory and recurrent-event applications.
In the counting-process representation, records the number of observed events and indicates whether individual is at risk. The Cox intensity is
Under the model, subtracting the integrated intensity from yields a martingale with respect to the relevant observed-history filtration. This representation explains why current risk-set covariates enter the score and provides a systematic basis for variance calculations and residual processes.
The model became a standard tool for studying mortality and disease recurrence, but the event need not be adverse or biological. Economic duration analyses use related hazard specifications for transitions out of unemployment or into a new job. Reliability applications examine component failure. Credit-risk studies can model default times, while recognizing that prepayment or account closure may require competing-event formulations. In every application, the definition of the event and the state in which a unit is at risk determine the meaning of the hazard.
High-dimensional data have motivated penalized Cox regression. With a penalty , estimation may minimize
Ridge penalties shrink coefficients smoothly; lasso penalties can set coefficients exactly to zero. These approaches are used, for example, when the number of molecular measurements is large relative to the number of observed events. Cross-validation can select tuning parameters, but feature selection, tuning, and performance assessment must be separated appropriately to avoid optimistic estimates.
Contemporary implementations also use nonlinear risk-score functions in place of , including models based on neural networks. If the resulting score depends only on fixed covariates and multiplies a common baseline hazard, the proportional hazards restriction remains. Greater flexibility in the covariate function does not by itself produce time-varying hazard ratios, resolve informative censoring, or supply a model for extrapolation beyond observed follow-up.