Introduction
Large randomised trials in cardiovascular medicine often use composite endpoints, such as the time to first death or first hospitalisation for heart failure. This approach increases the number of observed events and can therefore improve a trial's statistical power. However, the analysis of time to first event has an important limitation. All components of the composite endpoint are treated as equivalent with respect to the occurrence of the event, even though they may differ substantially in clinical severity.
For example, a patient who is hospitalised in the second month and dies in the sixth contributes only the hospitalisation to the classical time-to-first-event analysis. The later, more serious event, death, can no longer influence the analysis of time to first event. The problem becomes even more important when the most frequent component of the composite is also the least clinically serious, since it can dominate the overall result numerically.
The win ratio, proposed by Pocock and colleagues in 2012 [1], is a different approach to comparing treatment groups. Rather than looking only at which patient first experiences any of the events, it applies a prespecified hierarchy of clinical outcomes. Death, for example, is assessed before hospitalisation and, if the more serious events show no difference, other outcomes such as quality of life follow. In this way the clinical severity of the different outcomes is built into the analysis. The idea of hierarchical pairwise comparison already existed in the statistical literature [2], but the win ratio made it accessible to clinical research.
The approach has attracted particular interest in recent heart failure trials, where it has been used as the primary endpoint, among others in the EMPULSE trial [3], and the methodology has been the subject of practical guidance [4] and a recent JAMA methods guide [5].
This article presents the mechanism of the win ratio with a simple example, applies it to a simulated randomised trial and compares its results with those of the conventional time-to-first-event analysis. Along the way it examines what information the hierarchical approach adds, and which assumptions and limitations must be kept in mind when interpreting the result.
Pairwise comparison with a hierarchy
The basic idea of the win ratio is simple. Rather than looking only at which patient first experiences one of the events of the composite endpoint, the patients of the two treatment groups are compared in pairs. Every patient in the treatment group is compared with every patient in the control group. So, with 300 patients in each group, there are 300 × 300 = 90,000 pairs.
Each pair is assessed with the same prespecified hierarchy. The most clinically important outcome is examined first, for example death. If the information on death makes it possible to decide which of the two patients has the better outcome, the pair is scored as a win for one and a loss for the other, and the comparison stops there. If death cannot separate the two patients, the comparison moves to the next level of the hierarchy, for example hospitalisation. If hospitalisation does not produce a winner either, a third level is examined, such as the change in quality of life.
In this way the same comparison draws on different kinds of information in turn, without the less serious outcome overriding the more serious one. A difference in mortality takes priority over a difference in hospitalisations, while a difference in quality of life is examined only when the earlier levels of the hierarchy cannot separate the two patients.
At the end, the pairs won by the treated patient, NW, and those lost, NL, are counted. The win ratio is their ratio,
and it has a direct interpretation. A value of 1.5 means that, taking one random patient from each group, the treated patient is 50% more likely to have a better outcome than a worse one, with “better” defined by the hierarchy. Two related measures are often used alongside the win ratio. The win odds, (NW + NT/2)/(NL + NT/2), incorporates the ties NT by splitting them equally between the two groups, and is more stable when there are many of them [6]. The net benefit, (NW − NL)/N, expresses the difference between the probability of a win and the probability of a loss, and ranges from −1 to 1. The three measures describe the same process of pairwise comparisons, but differ in how they treat ties.
An example with simulated data
A randomised trial is simulated in 600 patients with heart failure, 300 per group, with follow-up of up to 24 months and staggered enrolment, so that follow-up time differs from patient to patient. The composite endpoint has three components, assessed in a prespecified hierarchical order. Cardiovascular death, with a two-year risk of 18% in the control group and a hazard ratio of 0.85 on treatment, a moderate effect. First hospitalisation for heart failure, with a two-year risk of 35% and a hazard ratio of 0.70. Change in the KCCQ score at 12 months, with a mean improvement of 3 points on control and 8 on treatment, a standard deviation of 15 and a clinical-relevance threshold of 5 points. The KCCQ is missing for those who died or left before 12 months.
rSimulating the trial and describing the groups40 lines
library(tidyverse); library(survival); library(boot); library(patchwork)
navy <- "#1F2A44"; pink <- "#D5487F"; grey <- "#8A93A6"; light <- "#EEF0F4"
theme_blog <- function(base_size = 12) {
theme_minimal(base_family = "sans", base_size = base_size) +
theme(panel.grid.minor = element_blank(),
panel.grid.major = element_line(colour = "#E6E8EE", linewidth = 0.4),
plot.title.position = "plot",
plot.title = element_text(face = "bold", colour = navy, size = base_size + 1),
plot.subtitle = element_text(colour = grey, size = base_size - 1, margin = margin(b = 10)),
axis.title = element_text(colour = grey, size = base_size - 1),
axis.text = element_text(colour = "#4B5563"),
legend.text = element_text(colour = "#4B5563", size = base_size - 2),
strip.text = element_text(colour = navy, face = "bold", hjust = 0))
}
theme_set(theme_blog())
set.seed(2026)
n_arm <- 300
lab_tr <- "Ομάδα θεραπείας"; lab_co <- "Ομάδα ελέγχου" # ετικέτες ομάδων, μία φορά
sim_arm <- function(n, treat) {
h_death <- -log(1 - 0.18) / 24 * (if (treat) 0.85 else 1) # μηνιαίος κίνδυνος θανάτου
h_hosp <- -log(1 - 0.35) / 24 * (if (treat) 0.70 else 1) # μηνιαίος κίνδυνος πρώτης νοσηλείας
t_death <- rexp(n, h_death)
t_hosp <- rexp(n, h_hosp)
cens <- runif(n, 18, 24) # κλιμακωτή ένταξη
fu <- pmin(t_death, cens) # χρόνος παρακολούθησης
tibble(arm = if (treat) lab_tr else lab_co,
fu = fu,
died = t_death <= cens,
t_hosp = if_else(t_hosp < fu, t_hosp, Inf), # νοσηλεία μόνο αν προηγήθηκε
kccq = if_else(fu < 12, NA_real_, rnorm(n, 3 + 5 * treat, 15)))
}
trial <- bind_rows(sim_arm(n_arm, TRUE), sim_arm(n_arm, FALSE)) |>
mutate(arm = factor(arm, levels = c(lab_co, lab_tr)))
trial |> group_by(arm) |>
summarise(`θάνατοι` = sum(died),
`νοσηλείες` = sum(is.finite(t_hosp)),
`μέση μεταβολή KCCQ` = round(mean(kccq, na.rm = TRUE), 1),
`διάμεση παρακολούθηση (μήνες)` = round(median(fu), 1))# A tibble: 2 × 5
arm θάνατοι νοσηλείες `μέση μεταβολή KCCQ` διάμεση παρακολούθηση…¹
<fct> <int> <int> <dbl> <dbl>
1 Ομάδα ελέγχου 57 77 2.9 20.7
2 Ομάδα θεραπείας 40 74 9.1 20.6
# ℹ abbreviated name: ¹`διάμεση παρακολούθηση (μήνες)`rPlot of the course of 40 patients per group15 lines
set.seed(11)
swim <- trial |> group_by(arm) |> slice_sample(n = 40) |>
arrange(arm, fu) |> mutate(row = row_number()) |> ungroup()
ggplot(swim) +
geom_segment(aes(x = 0, xend = fu, y = row, yend = row, colour = arm), linewidth = 2.2, alpha = 0.55, lineend = "round") +
geom_point(data = filter(swim, is.finite(t_hosp)), aes(t_hosp, row), shape = "|", size = 4, colour = navy) +
geom_point(data = filter(swim, died), aes(fu, row), shape = 4, size = 2.6, stroke = 1.3, colour = navy) +
facet_wrap(~ arm, nrow = 1) +
scale_colour_manual(values = c(grey, pink), guide = "none") +
scale_x_continuous(breaks = seq(0, 24, 6), expand = expansion(mult = c(0, 0.03))) +
scale_y_continuous(breaks = NULL) +
labs(x = "μήνες από την ένταξη", y = NULL,
title = "Δύο ομάδες και τρία είδη πληροφορίας",
subtitle = "γραμμή = παρακολούθηση, | = πρώτη νοσηλεία, × = θάνατος") +
theme(panel.grid.major.y = element_blank())
The conventional analysis
The composite endpoint “death or hospitalisation, whichever comes first” is analysed with a Cox model.
rCox models for the composite and for death12 lines
trial <- trial |>
mutate(t_first = pmin(fu, t_hosp),
e_first = as.integer(died | is.finite(t_hosp)),
first_is_death = died & !is.finite(t_hosp))
fit_comp <- coxph(Surv(t_first, e_first) ~ arm, data = trial)
hr_comp <- exp(coef(fit_comp)); ci_comp <- exp(confint(fit_comp))
fit_death <- coxph(Surv(fu, died) ~ arm, data = trial)
hr_death <- exp(coef(fit_death))
tibble(`καταληκτικό σημείο` = c("θάνατος ή νοσηλεία (πρώτο συμβάν)", "θάνατος"),
`συμβάντα` = c(sum(trial$e_first), sum(trial$died)),
`εκ των οποίων θάνατοι` = c(sum(trial$first_is_death), sum(trial$died)),
HR = round(c(hr_comp, hr_death), 2))# A tibble: 2 × 4
`καταληκτικό σημείο` συμβάντα `εκ των οποίων θάνατοι` HR
<chr> <int> <int> <dbl>
1 θάνατος ή νοσηλεία (πρώτο συμβάν) 233 82 0.87
2 θάνατος 97 97 0.67Of the 233 first events, only 82 are deaths. The composite hazard ratio of 0.87 is essentially the hazard ratio for hospitalisations. Deaths that followed a hospitalisation do not count at all, and the improvement in quality of life is not taken into account.
Computing the win ratio
The computation is written in base R. The pairs are formed with outer(), which gives a 300 by 300 matrix, and each rule is applied to the whole matrix at once. The key point is censoring. Two patients are compared on death only within their shared follow-up time, the shorter of the two [1]. If one died in month 20 and the other left the trial in month 18, we do not know whether the second would have been alive in month 20, and the pair is a tie on death. The same rule applies to hospitalisation.
rThe win_ratio() function and the result40 lines
win_ratio <- function(tr, co, delta = 5) {
tau <- outer(tr$fu, co$fu, pmin) # κοινός χρόνος παρακολούθησης
fu_i <- outer(tr$fu, co$fu, function(a, b) a)
fu_j <- outer(tr$fu, co$fu, function(a, b) b)
d_i <- outer(tr$died, co$died, function(a, b) a)
d_j <- outer(tr$died, co$died, function(a, b) b)
res <- matrix(0L, nrow(tr), nrow(co)) # +1 νίκη, -1 ήττα, 0 ισοπαλία
tier <- matrix(0L, nrow(tr), nrow(co))
# επίπεδο 1: θάνατος μέσα στον κοινό χρόνο
i_first <- d_i & fu_i < fu_j
j_first <- d_j & fu_j < fu_i
res[i_first] <- -1L; res[j_first] <- 1L; tier[i_first | j_first] <- 1L
# επίπεδο 2: πρώτη νοσηλεία μέσα στον κοινό χρόνο, μόνο για τα ζεύγη που δεν κρίθηκαν
und <- res == 0L
h_i <- outer(tr$t_hosp, co$t_hosp, function(a, b) a)
h_j <- outer(tr$t_hosp, co$t_hosp, function(a, b) b)
i_h <- und & h_i <= tau & h_i < h_j
j_h <- und & h_j <= tau & h_j < h_i
res[i_h] <- -1L; res[j_h] <- 1L; tier[i_h | j_h] <- 2L
# επίπεδο 3: μεταβολή KCCQ, όριο delta
und <- res == 0L
diff <- outer(tr$kccq, co$kccq, "-") # NA αν λείπει σε κάποιον
i_k <- und & !is.na(diff) & diff >= delta
j_k <- und & !is.na(diff) & diff <= -delta
res[i_k] <- 1L; res[j_k] <- -1L; tier[i_k | j_k] <- 3L
nw <- sum(res == 1L); nl <- sum(res == -1L); nt <- sum(res == 0L); N <- length(res)
list(wr = nw / nl, win_odds = (nw + nt / 2) / (nl + nt / 2), net_benefit = (nw - nl) / N,
nw = nw, nl = nl, nt = nt, res = res, tier = tier)
}
tr <- filter(trial, arm == lab_tr); co <- filter(trial, arm == lab_co)
w <- win_ratio(tr, co)
tibble(`ζεύγη` = length(w$res), `νίκες` = w$nw, `ήττες` = w$nl, `ισοπαλίες` = w$nt,
`win ratio` = round(w$wr, 2), `win odds` = round(w$win_odds, 2),
`net benefit` = round(w$net_benefit, 3))# A tibble: 1 × 7
ζεύγη νίκες ήττες ισοπαλίες `win ratio` `win odds` `net benefit`
<int> <int> <int> <int> <dbl> <dbl> <dbl>
1 90000 48723 35019 6258 1.39 1.36 0.152The win ratio is 1.39. A treated patient is 39% more likely to do better than a random control patient than to do worse, judging first by survival, then by hospitalisations and finally by quality of life. Figure 2 shows how the 90,000 pairs pass through the three levels of the hierarchy.
rPlot of the pairs passing through the hierarchy22 lines
N <- length(w$res)
casc <- tibble(tier = 1:3,
wins = map_int(1:3, ~ sum(w$res == 1 & w$tier == .x)),
losses = map_int(1:3, ~ sum(w$res == -1 & w$tier == .x))) |>
mutate(entering = N - lag(cumsum(wins + losses), default = 0),
remaining = entering - wins - losses,
level = factor(c("1. θάνατος", "2. νοσηλεία ΚΑ", "3. KCCQ ≥ 5 μονάδες"), levels = rev(c("1. θάνατος", "2. νοσηλεία ΚΑ", "3. KCCQ ≥ 5 μονάδες"))))
casc_long <- casc |>
transmute(level, `νίκες θεραπείας` = wins, `αδιευκρίνιστα, περνούν στο επόμενο` = remaining, `ήττες θεραπείας` = losses) |>
pivot_longer(-level, names_to = "τι έγινε", values_to = "n") |>
mutate(`τι έγινε` = factor(`τι έγινε`, levels = c("νίκες θεραπείας", "αδιευκρίνιστα, περνούν στο επόμενο", "ήττες θεραπείας")))
ggplot(casc_long, aes(n, level, fill = `τι έγινε`)) +
geom_col(width = 0.62, colour = "white", linewidth = 0.6) +
geom_text(aes(label = if_else(n > 2500, format(n, big.mark = "."), "")),
position = position_stack(vjust = 0.5), colour = "white", size = 3.4, fontface = "bold") +
annotate("text", x = N, y = 3.45, label = paste0(format(N, big.mark = "."), " ζεύγη εισέρχονται"), hjust = 1, size = 3.3, colour = grey) +
scale_fill_manual(values = c(pink, light, navy), name = NULL) +
scale_x_continuous(labels = function(x) format(x, big.mark = "."), expand = expansion(mult = c(0, 0.02))) +
labs(x = "ζεύγη", y = NULL, title = "Από 90.000 ζεύγη σε ένα win ratio",
subtitle = sprintf("νίκες %s, ήττες %s, ισοπαλίες %s → win ratio %.2f",
format(w$nw, big.mark = "."), format(w$nl, big.mark = "."), format(w$nt, big.mark = "."), w$wr)) +
theme(legend.position = "bottom", panel.grid.major.y = element_blank())
Confidence interval
The 90,000 pairs are not independent observations; each patient takes part in 300 of them. There are analytical formulas for the standard deviation of the log win ratio [7, 8], implemented in the WINS and WinRatio packages. The bootstrap from the related article gives the same result without a formula, by resampling patients, separately within each group, and repeating the whole comparison.
rBootstrap confidence interval for the win ratio12 lines
wr_fun <- function(data, idx) {
b <- data[idx, ]
rr <- win_ratio(filter(b, arm == lab_tr), filter(b, arm == lab_co))
log(rr$wr)
}
set.seed(2026)
b_wr <- boot(trial, wr_fun, R = 1000, strata = trial$arm)
ci_wr <- exp(boot.ci(b_wr, type = "perc")$percent[4:5])
tibble(`win ratio` = round(w$wr, 2),
`95% ΔΕ (bootstrap)` = sprintf("%.2f–%.2f", ci_wr[1], ci_wr[2]),
`HR σύνθετου σημείου` = round(hr_comp, 2),
`95% ΔΕ` = sprintf("%.2f–%.2f", ci_comp[1], ci_comp[2]))# A tibble: 1 × 4
`win ratio` `95% ΔΕ (bootstrap)` `HR σύνθετου σημείου` `95% ΔΕ`
<dbl> <chr> <dbl> <chr>
1 1.39 1.14–1.67 0.87 0.67–1.12The strata argument keeps the size of each group fixed in every bootstrap sample, as randomisation would. The bootstrap is done on the log scale, where the distribution is more symmetric, and the interval is brought back to the original scale by exponentiation.
rForest plot of the three measures19 lines
ci_death <- exp(confint(fit_death))
forest <- tibble(
`μέτρο` = factor(c("HR θανάτου", "HR σύνθετου (πρώτο συμβάν)", "win ratio"),
levels = rev(c("HR θανάτου", "HR σύνθετου (πρώτο συμβάν)", "win ratio"))),
est = c(hr_death, hr_comp, w$wr),
lo = c(ci_death[1], ci_comp[1], ci_wr[1]),
hi = c(ci_death[2], ci_comp[2], ci_wr[2]),
kind = c("HR", "HR", "WR"))
ggplot(forest, aes(est, `μέτρο`, colour = kind)) +
geom_vline(xintercept = 1, colour = grey, linetype = "dashed") +
geom_errorbar(aes(xmin = lo, xmax = hi), width = 0, linewidth = 1.1, orientation = "y") +
geom_point(size = 4.2) +
geom_text(aes(label = sprintf("%.2f (%.2f–%.2f)", est, lo, hi)), vjust = -1.1, size = 3.3, colour = navy) +
scale_x_log10(breaks = c(0.5, 0.7, 1, 1.5, 2)) +
scale_colour_manual(values = c(HR = navy, WR = pink), guide = "none") +
labs(x = "εκτίμηση (λογαριθμική κλίμακα), 95% ΔΕ", y = NULL,
title = "Hazard and win ratios",
subtitle = "HR < 1 και win ratio > 1 σημαίνουν όφελος της θεραπείας") +
theme(panel.grid.major.y = element_blank())
Limitations and interpretation
The first property of the win ratio to keep in mind is that it depends not only on the treatment but also on the distribution of follow-up time [9]. Pairs with a short shared time do not get the chance to be decided on death and move on to the later levels, so a trial with shorter follow-up gives a win ratio determined more by the secondary criteria. The effect shows when the same trial is analysed with an end at 12, 18 and 24 months.
rThe same trial ending at 12, 18 and 24 months30 lines
truncate_at <- function(d, tmax) d |>
mutate(died = died & fu <= tmax, fu = pmin(fu, tmax),
t_hosp = if_else(t_hosp <= tmax, t_hosp, Inf),
kccq = if (tmax < 12) NA_real_ else kccq)
fu_scan <- map_dfr(c(12, 18, 24), function(tmax) {
tt <- truncate_at(trial, tmax)
ww <- win_ratio(filter(tt, arm == lab_tr), filter(tt, arm == lab_co))
tibble(tmax = tmax, wr = ww$wr,
`1. θάνατος` = mean(ww$tier == 1), `2. νοσηλεία` = mean(ww$tier == 2),
`3. KCCQ` = mean(ww$tier == 3), `ισοπαλία` = mean(ww$tier == 0))
})
p_wr <- ggplot(fu_scan, aes(factor(tmax), wr)) +
geom_segment(aes(xend = factor(tmax), y = 1, yend = wr), colour = alpha(pink, 0.4), linewidth = 6, lineend = "round") +
geom_point(colour = pink, size = 7) +
geom_text(aes(label = sprintf("%.2f", wr)), colour = "white", size = 3, fontface = "bold") +
geom_hline(yintercept = 1, colour = grey, linetype = "dashed") +
scale_y_continuous(limits = c(0.9, max(fu_scan$wr) * 1.12)) +
labs(x = "παρακολούθηση (μήνες)", y = "win ratio", title = "Το win ratio αλλάζει")
p_tier <- fu_scan |>
pivot_longer(c(`1. θάνατος`, `2. νοσηλεία`, `3. KCCQ`, `ισοπαλία`), names_to = "επίπεδο", values_to = "share") |>
mutate(`επίπεδο` = factor(`επίπεδο`, levels = rev(c("1. θάνατος", "2. νοσηλεία", "3. KCCQ", "ισοπαλία")))) |>
ggplot(aes(factor(tmax), share, fill = `επίπεδο`)) +
geom_col(width = 0.62, colour = "white", linewidth = 0.6) +
geom_text(aes(label = if_else(share > 0.06, scales::percent(share, accuracy = 1), "")),
position = position_stack(vjust = 0.5), colour = "white", size = 3.2, fontface = "bold") +
scale_fill_manual(values = c(grey, alpha(navy, 0.4), alpha(navy, 0.7), navy), name = NULL) +
scale_y_continuous(labels = scales::percent, expand = c(0, 0)) +
labs(x = "παρακολούθηση (μήνες)", y = NULL, title = "Ποιο επίπεδο κρίνει τα ζεύγη") +
theme(legend.position = "right", panel.grid.major.x = element_blank())
p_wr + p_tier + plot_layout(widths = c(1, 1.4))
This dependence is linked to a deeper limitation. The win ratio is a measure of relative superiority, not of absolute effect. A value of 1.5 does not say how many deaths or how many hospitalisations the treatment prevents, and without the results for each component separately it cannot be judged whether the superiority comes from survival or from quality of life [4]. For the same reason the hierarchy and the thresholds that define it are not technical details but part of the question. A KCCQ threshold of 10 points instead of 5 moves pairs from wins and losses into ties and changes the win ratio without changing anything about the patients, and when ties become numerous the ratio of two small numbers becomes unstable, so the win odds, which incorporates them, is preferable [6]. Finally, because the method compares pairs rather than individuals, it does not adjust directly for covariates the way a regression model does. Adjustment is done by stratification [10] or with the newer regression models for win statistics.
The win ratio answers a question the conventional composite analysis cannot: which treatment gives the better overall outcome when the components of the outcome are not equivalent. It pays for this with a dependence on the design of follow-up and a demand for prespecified clinical choices. Its reporting should therefore include the hierarchy, the thresholds, the number and share of pairs decided at each level, the confidence interval and the results for each component separately [4, 5].
References
- Pocock SJ, Ariti CA, Collier TJ, Wang D. The win ratio: a new approach to the analysis of composite endpoints in clinical trials based on clinical priorities. Eur Heart J. 2012;33(2):176–182.
- Finkelstein DM, Schoenfeld DA. Combining mortality and longitudinal measures in clinical trials. Stat Med. 1999;18(11):1341–1354.
- Voors AA, Angermann CE, Teerlink JR, et al. The SGLT2 inhibitor empagliflozin in patients hospitalized for acute heart failure: a multinational randomized trial (EMPULSE). Nat Med. 2022;28(3):568–574.
- Redfors B, Gregson J, Crowley A, et al. The win ratio approach for composite endpoints: practical guidance based on previous experience. Eur Heart J. 2020;41(46):4391–4399.
- JAMA Guide to Statistics and Methods. Win ratio method for hierarchical composite outcomes in clinical trials. JAMA. 2026. doi:10.1001/jama.2025.25686.
- Brunner E, Vandemeulebroecke M, Mütze T. Win odds: an adaptation of the win ratio to include ties. Stat Med. 2021;40(14):3367–3384.
- Bebu I, Lachin JM. Large sample inference for a win ratio analysis of a composite outcome based on prioritized components. Biostatistics. 2016;17(1):178–187.
- Dong G, Li D, Ballerstedt S, Vandemeulebroecke M. A generalized analytic solution to the win ratio to analyze a composite endpoint considering the clinical importance order among components. Pharm Stat. 2016;15(5):430–437.
- Oakes D. On the win-ratio statistic in clinical trials with multiple types of event. Biometrika. 2016;103(3):742–745.
- Dong G, Qiu J, Wang D, Vandemeulebroecke M. The stratified win ratio. J Biopharm Stat. 2018;28(4):778–796.


