Quanticate Blog

Cox Proportional Hazards Models in Clinical Trials: Diagnostics & Implementation

Written by Clinical Programming Team | Fri, Nov 21, 2025

Survival analysis plays a critical role in clinical trials, helping researchers evaluate time-to-event outcomes such as death, relapse, or recovery. Kaplan–Meier curves are widely used for visualising survival probabilities from exact event times and have largely replaced traditional life-table methods that group time into intervals, but they do not account for covariates. The Cox proportional hazards model addresses this limitation and is the most used method for multivariable survival analysis.

Summary

Cox Proportional Hazard Model

Survival models are commonly used in clinical trials as they are designed to perform 'time to event' analyses on data with censored observations – something that probably all clinical programmers are familiar with. As censored observation in this case we understand a subject who did not experience the defined event during the whole observation period.

While thinking of survival analysis, potentially the most popular models are lifetables and Cox proportional hazard model, with Kaplan-Meier curves now the standard approach for exact event times in most trials. Lifetables seem to be the simplest way to analyse survival time, i.e. time that is measured for each subject from the beginning of the observation period till the defined event occurrence (e.g. an adverse event occurrence, death, full recovery) or till the end of observation period if subject did not experience the event. In practice, lifetables summarise survival over grouped time intervals, whereas Kaplan-Meier treats each distinct event time separately. The idea of this method is to estimate the survival function, which is the probability of ‘survival’ (in other words: probability of not experiencing the event) at least to the timepoint t. Such estimation is being performed at each timepoint t at which an event occurred.

Between the subsequent event occurrences, survival function is assumed to be constant. On the other hand, the hazard function is being estimated, which is interpreted as the conditional probability of the event occurrence at timepoint t provided that the event had not occurred before. Again, hazard function is being estimated at timepoints at which an event occurred and is constant between subsequent event occurrences.

Lifetables

Lifetables are quite simple to estimate and to interpret – it is very helpful to present survival function on the plot to see how the survival probability or hazard function changes over time. However, this method has its drawbacks as well. The most painful is probably the fact that it is impossible to assess impact of continuous variables (e.g. age) on the hazard level. The only thing we can do is to divide the whole sample into categories, based on categorical variable (e.g. age group) and compare survival functions between such groups.

There are several tests available that make it possible to state whether survival functions for two separate sub-samples are statistically different or not. But still, even if we know that younger subjects have different survival function than older, we cannot say exactly how the survival function changes if a person gets one year older. For such estimations, Cox proportional hazard model becomes very useful. The model takes the hazard level as a dependent variable. Not only is it possible to include in the model continuous variables (and estimate the approximate change in hazard level if, for example, subject gets one year older) but also we can add so-called time-dependent variables.

In general, thanks to the Cox model in clinical programming we can compare two subjects with respect to their hazard level in quantitative manner, i.e. on the basis of parameters estimates we can say that among women, subject who is 40 years old is twice as likely to experience a given adverse event as a subject who is 20 years old. Time-dependent variables are necessary in cases when this relation is not constant, i.e. varies over time. Time-dependent covariates are variables whose value changes during follow-up, whereas time-varying coefficients allow the effect of a covariate to change over time. In practice, these structures are often implemented using start-stop style inputs (for example, tstart, tstop, status) to represent changing covariate values or effects. Of course, Cox model, as much more complicated than lifetables requires several restrictive assumptions to be satisfied.

Survival Analysis Basics

Kaplan–Meier estimates survival probabilities without covariates. It is useful for comparing groups visually but cannot quantify the effect of continuous variables. Lifetables are simple but limited. Cox models overcome these limitations by allowing continuous and categorical covariates. Below is a Kaplan–Meier curve illustrating survival probability over time.

Cox Proportional Hazards Model Explained

The Cox Proportional Hazards Model (CPHM) is a semi-parametric survival model that does not assume a specific baseline hazard function. It expresses the hazard as:

h(t | X) = h₀(t) × exp(βX)

where:
•    h(t | X) = hazard at time t given covariates X
•    h₀(t) = baseline hazard
•    β = vector of coefficients


Key Features:
•    Allows multiple covariates, including time-dependent variables; time-varying coefficients can be represented via interactions with time.
•    Estimates β using partial likelihood:
ℓ(β) = Σ [βXᵢ − log Σ e^(βXⱼ)],
where the inner sum is over the risk set at time tᵢ.

Assumptions:
•    Proportional hazards (hazard ratios constant over time)
•    Independent censoring
•    Correct covariate specification


Handling Ties: Common methods include Efron, Breslow, and Exact approaches. Many software implementations, including SAS and R, use Efron as the default because it performs well when there are moderate numbers of ties. Breslow is simpler but can be less accurate with many tied event times, while exact methods are more computationally intensive and are most useful in smaller datasets or when event times are heavily rounded or discrete.

Interpretation: exp(βₖ) = hazard ratio for a one-unit increase in covariate Xₖ.

Model Diagnostics and Non-PH Strategies

Checking the proportional hazards assumption is critical. Tools include Schoenfeld residuals, cox.zph in R, and log-minus-log plots. A simple workflow is to fit the model, inspect Schoenfeld residual plots, review cox.zph global and covariate-specific tests, and in SAS use ASSESS PH (and related ZPH plots) alongside log-minus-log curves for grouped covariates. If PH assumption fails, strategies include stratified Cox models, time-by-covariate interactions, and piecewise models. When hazards are clearly not proportional, a single hazard ratio no longer adequately summarises the treatment effect, and the interpretation becomes time-specific or averaged over time rather than constant. Below is a diagnostic plot example.

Interpreting Results and Reporting

Hazard ratios (HRs) are obtained by exponentiating coefficients. HR > 1 indicates increased risk; HR < 1 indicates reduced risk. Always report confidence intervals and clarify scaling. For continuous covariates, it is often more interpretable to present effects per 5 or 10 units (for example, per 10-year increase in age) rather than per single unit. Common pitfalls include presenting HRs as absolute risks or probabilities, or implying a constant proportional effect when the proportional hazards assumption is doubtful. Regulatory expectations include pre-specification, diagnostics disclosure, and sensitivity analyses. Below is a hazard ratio chart.

Alternatives When PH Fails

Restricted Mean Survival Time (RMST) is an alternative when hazards are not proportional. RMST provides an interpretable measure of average survival time within a fixed period.

Practical Implementation

The Cox Proportional Hazards Model can be implemented in SAS and R, two commonly used tools for survival analysis.

SAS Example:
PROC PHREG DATA=dataset;
    MODEL time*status(0) = age treatment / TIES=EFRON;
    ASSESS PH / RESAMPLE;
RUN;

Explanation:
•    time*status(0) specifies survival time and censoring indicator (0 = censored).
•    age treatment are covariates in the model.
•    TIES=EFRON handles tied event times using Efron’s method.
•    ASSESS PH / RESAMPLE checks the proportional hazards assumption.
Output:
•    Parameter estimates (β), hazard ratios, confidence intervals.
•    Diagnostics for proportional hazards assumption.

R Example:
library(survival)
fit <- coxph(Surv(time, status) ~ age + treatment, data = dataset)
summary(fit)
cox.zph(fit)

Explanation:
•    Surv(time, status) creates a survival object.
•    coxph() fits the Cox model.
•    summary(fit) provides coefficients, hazard ratios, and significance.
•    cox.zph(fit) tests proportional hazards assumption using Schoenfeld residuals.

Output:
•    Hazard ratios for covariates.
•    p-values for assumption checks.
•    Global test for proportional hazards.

In a CDISC-compliant workflow, time-to-event analyses are typically based on the ADaM ADTTE dataset, with clear traceability from raw data and SDTM through derivations to Cox model inputs and outputs.

Conclusion

Cox proportional hazards models remain the standard tool for analysing time-to-event outcomes with covariates in clinical trials. By defining assumptions clearly, checking proportional hazards using diagnostics such as Schoenfeld residuals, cox.zph, log-minus-log plots and ASSESS PH in PROC PHREG, and implementing models reproducibly in SAS or R on traceable ADTTE datasets, teams can generate interpretable hazard ratios and, when needed, complementary measures such as RMST. For practical steps, refer back to the diagnostics and implementation sections above when planning or reviewing Cox regression analyses.

Quanticate’s statistical programming team routinely implement Cox proportional hazards models, survival analyses, and ADaM ADTTE datasets with robust diagnostics and traceability. If you require support with time-to-event analysis, model implementation, or validation, please submit an RFI and a member of our business development team will be in touch shortly.

FAQs

What is the difference between Kaplan–Meier and Cox proportional hazards model?
Kaplan–Meier (KM) estimates survival probabilities over time without considering covariates. It is useful for visualising survival curves and comparing groups. The Cox proportional hazards model, on the other hand, evaluates the effect of multiple covariates on the hazard rate, making it more suitable for multivariable analysis.

What is the key assumption of the Cox proportional hazards model?
The primary assumption is proportional hazards—the hazard ratio between two individuals remains constant over time. This means the relative risk does not change as time progresses.

When should you use a Cox model?
Use a Cox model when you need to assess the impact of covariates (e.g., age, treatment) on time-to-event outcomes while accounting for censoring. It is ideal for clinical trials, epidemiological studies, and any survival analysis involving multiple predictors.

What does Cox regression tell you?
 Cox regression estimates hazard ratios for covariates, indicating how each variable influences the risk of an event occurring at any given time. For example, a hazard ratio of 2 means the event risk is twice as high for one group compared to another. 

How do you check the proportional hazards assumption?
Common methods include:
•    Schoenfeld residuals and the cox.zph() test in R.
•    Log-minus-log survival plots for visual assessment.
•    SAS options like ASSESS PH in PROC PHREG.

What is the Cox proportional hazard model adjustment?
Adjustment refers to including relevant covariates in the model to control for confounding factors. This ensures the hazard ratios reflect the independent effect of each variable.