arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2608.16529v1 [stat.ME] 17 Aug 2026

Randomization inference for treatment effects on survival outcomes

Lucy D’Agostino McGowan Thanks: Funding/Support Research reported in this publication was funded through a Patient-Centered Outcomes Research Institute (PCORI) Award (ME-2023C2-33433). Role of Sponsor The statements in this publication are solely the responsibility of the authors and do not necessarily represent the views of the Patient-Centered Outcomes Research Institute (PCORI), its Board of Governors or Methodology Committee. Note: mcgowald@wfu.edu Affiliation: Department of Statistical Sciences, Wake Forest University Affiliation: Joseph Rigdon11footnotemark: 1 Affiliation: Department of Biostatistics and Data Science, Affiliation: Wake Forest University School of Medicine Affiliation: Xinran Li Affiliation: Department of Statistics, University of Chicago Affiliation: Dylan Small Affiliation: Department of Statistics and Data Science, Affiliation: The Wharton School, University of Pennsylvania
Abstract

The log-rank test and Kaplan–Meier plot are standard tools for analyzing time-to-event data in randomized clinical trials, yet neither provides a summary of the magnitude of the treatment effect. Practitioners typically fill this gap by reporting a hazard ratio from a Cox proportional-hazards model or an acceleration factor from an accelerated failure time (AFT) model, but both require assumptions beyond those needed for the log-rank test or Kaplan–Meier estimator. We propose two nonparametric confidence intervals for scalar effect-size summaries, an additive shift cc and a multiplicative factor ρ\rho, obtained by inverting the log-rank test under sharp null hypotheses of constant treatment effects. Building on the randomization-inference framework of 4, both intervals are valid under the randomization distribution alone, requiring no assumptions for the event-time distribution. We evaluate the proposed multiplicative interval via simulation, finding that it maintains nominal coverage across a range of censoring rates and sample sizes, including under data-generating processes that misspecify a parametric AFT model, while incurring only a modest efficiency loss compared to parametric AFT inference under correct specification. We illustrate the approach using data from a randomized trial of rhDNase for cystic fibrosis and provide R code and a Shiny application for ease of implementation.

Keywords: survival analysis, log-rank test, randomization inference, time-to-event, accelerated failure time

1 Introduction

The Kaplan–Meier plot and the log-rank test are common tools used to analyze time-to-event data in randomized clinical trials. The Kaplan–Meier plot conveys the full shape of each arm’s survival curve, while the log-rank test provides a pp-value for the null hypothesis of no treatment effect. Neither, however, directly quantify the overall magnitude of the treatment effect, an important quantity when trying to establish both statistical and clinical significance. Practitioners typically fill this gap by reporting a hazard ratio from a Cox proportional-hazards model [1]. The Cox hazard ratio is well understood, but it relies on the proportional-hazards assumption, which may be violated in practice and which is not required for the validity of either the Kaplan–Meier estimator or the log-rank test. Accelerated failure time (AFT) models [11] offer an alternative effect-size summary, but likewise require assumptions about the data-generating process.

A potential alternative is to report effect-size summaries that, like the log-rank test itself, require no parametric model and are valid under the randomization distribution alone. 4 established a finite-population randomization-inference foundation for the log-rank test under noninformative censoring, showing that the log-rank statistic is asymptotically standard normal conditional on the potential outcomes under the sharp null of no treatment effect. Their framework accommodates Bernoulli randomized designs and imposes only mild regularity conditions on the joint distribution of event and censoring times. Building on 4, we observe that their result extends to a family of sharp null hypotheses of constant treatment effects, both additive and multiplicative. Typically, randomization-based inference for a sharp null hypothesis involves transforming the potential outcomes [7]; we extend this transformation to the potential censoring times as well, which ensures that the realized time at risk and event indicator are fully determined under the null. Inverting the resulting tests yields confidence intervals (CIs) for two complementary scalar summaries of the treatment effect. The first is an additive shift parameter, cc. Under the null, HcH_{c}, treatment adds cc time units to every unit’s event time. The CI for cc is expressed on the original time scale and answers the question “by how much did treatment delay the event?” The second is a multiplicative factor, ρ\rho. Under the null, HρH_{\rho}, treatment multiplies every unit’s event time by ρ\rho. This parameter targets the same estimand as the acceleration factor in AFT models, but unlike model-based AFT inference, its validity derives from the randomization distribution alone, requiring no assumption on the event time distribution or the censoring beyond that censoring times are independent and identically distributed. Both CIs are computed by evaluating the log-rank pp-value over a fine grid of candidate parameter values and retaining those not rejected at the α\alpha-level.

The remainder of the paper is organized as follows. Section 2 introduces the potential outcomes setup and assumptions from 4. Section 3 derives the tests for sharp nulls of additive and multiplicative constant effects. Section 4 presents the CI construction and discusses computation and interpretation. Section 5 includes simulation results demonstrating the operating characteristics in comparison to parametric model-based methods. Section 6 applies the method to real trial data and provides R code for ease of implementation. Finally, Section 7 concludes with discussion of extensions and limitations.

2 Setup, Notation and Assumptions

We first introduce the setup, notation and assumptions from 4. We consider an experiment on nn units with two treatment arms. For each unit ii, let Ti​(1)T_{i}(1) and Ti​(0)T_{i}(0) denote the potential event times under treatment and control, and Ci​(1)C_{i}(1) and Ci​(0)C_{i}(0) denote the potential censoring times under treatment and control, respectively. Let 𝑻⁡(1)=(T1​(1),…,Tn​(1))⊤\boldsymbol{T}(1)=\bigl(T_{1}(1),\ldots,T_{n}(1)\bigr)^{\top}, 𝑻⁡(0)=(T1​(0),…,Tn​(0))⊤\boldsymbol{T}(0)=\bigl(T_{1}(0),\ldots,T_{n}(0)\bigr)^{\top}, 𝑪⁡(1)=(C1​(1),…,Cn​(1))⊤\boldsymbol{C}(1)=\bigl(C_{1}(1),\ldots,C_{n}(1)\bigr)^{\top}, and 𝑪⁡(0)=(C1​(0),…,Cn​(0))⊤\boldsymbol{C}(0)=\bigl(C_{1}(0),\ldots,C_{n}(0)\bigr)^{\top}.

Let Zi∈{0,1}Z_{i}\in\{0,1\} be the treatment assignment for unit ii, where Zi=1Z_{i}=1 if unit ii receives the active treatment and Zi=0Z_{i}=0 otherwise. The observed time at risk and the observed event indicator is

Wi={min⁡{Ti​(1),Ci​(1)},if ​Zi=1,min⁡{Ti​(0),Ci​(0)},if ​Zi=0,​ and ​Δi={1{Ti(1)≤Ci(1)},if ​Zi=1,1{Ti(0)≤Ci(0)},if ​Zi=0.\displaystyle W_{i}=\begin{cases}\min\{T_{i}(1),C_{i}(1)\},&\text{if }Z_{i}=1,\\ \min\{T_{i}(0),C_{i}(0)\},&\text{if }Z_{i}=0,\end{cases}\text{ and }\Delta_{i}=\begin{cases}1\{T_{i}(1)\leq C_{i}(1)\},&\text{if }Z_{i}=1,\\ 1\{T_{i}(0)\leq C_{i}(0)\},&\text{if }Z_{i}=0.\end{cases}
Assumption 1.

Zi|(𝑻⁡(1),𝑻⁡(0),𝑪⁡(1),𝑪⁡(0))​∼i.i.d.​Bern​(p1)Z_{i}\mid\bigl(\boldsymbol{T}(1),\boldsymbol{T}(0),\boldsymbol{C}(1),\boldsymbol{C}(0)\bigr)\overset{\mathrm{i.i.d.}}{\sim}\mathrm{Bern}(p_{1}), 1≤i≤n,1\leq i\leq n, for some p1∈(0,1)p_{1}\in(0,1).

In other words, conditional on all potential event and censoring times, treatment assignments are i.i.d. across units, each with probability p1p_{1}. This formalizes randomization, meaning treatment assignment is independent of both potential outcomes and potential censoring times.

Second, we consider the distribution of (𝑪⁡(1),𝑪⁡(0))(\boldsymbol{C}(1),\boldsymbol{C}(0)), also called the censoring mechanism. We focus on the case of noninformative i.i.d. censoring.

Assumption 2.

The potential censoring times for all units are independent of the potential event times for all units, that is, (𝐂⁡(1),𝐂⁡(0))⟂⟂(𝐓⁡(1),𝐓⁡(0))(\boldsymbol{C}(1),\boldsymbol{C}(0))\perp\!\!\!\perp(\boldsymbol{T}(1),\boldsymbol{T}(0)), and the nn two-dimensional random vectors

(C1​(1),C1​(0)),…,(Cn​(1),Cn​(0))\bigl(C_{1}(1),C_{1}(0)\bigr),\ldots,\bigl(C_{n}(1),C_{n}(0)\bigr)

are i.i.d.

This holds, for example, when censoring is due to administrative end of study or when subjects withdraw from the study for reasons unrelated to their outcome status. It would be violated if, for instance, subjects in worse health were more likely to drop out.

3 Tests for the sharp null of constant effects

3.1 Additive shift

Consider the null hypothesis

Hc:Ti​(1)=Ti​(0)+cH_{c}:\ T_{i}(1)=T_{i}(0)+c

for some c≥0c\geq 0.

Remark 1.

We can also consider the sharp null with constant effect c<0c<0, by switching the treatment and control labels.

Let Wi,c=Wi+c⁡(1−Zi)W_{i,c}=W_{i}+c(1-Z_{i}) for 1≤i≤n,1\leq i\leq n, and let LRc\textsc{LR}_{c} denote the logrank statistic computed using the data {(Zi,Δi,Wi,c):1≤i≤n}.\{(Z_{i},\Delta_{i},W_{i,c}):1\leq i\leq n\}.

Define, for 1≤i≤n1\leq i\leq n,

T~i​(1)=Ti​(1),T~i​(0)=Ti​(0)+c,C~i​(1)=Ci​(1),C~i​(0)=Ci​(0)+c,\tilde{T}_{i}(1)=T_{i}(1),\qquad\tilde{T}_{i}(0)=T_{i}(0)+c,\qquad\tilde{C}_{i}(1)=C_{i}(1),\qquad\tilde{C}_{i}(0)=C_{i}(0)+c,
Theorem 1.

Under the null hypothesis HcH_{c} for any c≥0c\geq 0, if Assumptions 1 and 2 hold, and the regularity conditions (i.e., Condition 1 or 2 in 4) hold for the transformed potential event times {(T~i​(1),T~i​(0))}i=1n\{(\tilde{T}_{i}(1),\tilde{T}_{i}(0))\}_{i=1}^{n} and the transformed potential censoring times {(C~i​(1),C~i​(0))}i=1n,\{(\tilde{C}_{i}(1),\tilde{C}_{i}(0))\}_{i=1}^{n}, then

LRc|𝑻⁡(1),𝑻⁡(0)→𝑑N⁡(0,1).\textsc{LR}_{c}\mid\boldsymbol{T}(1),\boldsymbol{T}(0)\xrightarrow{d}N(0,1).
Proof.

First, we can verify that Assumptions 1 and 2 still hold after replacing the original potential event and censoring times by the transformed potential event and censoring times.

Second, under HcH_{c}, Fisher’s null of no treatment effect holds for the transformed potential event times. That is, T~i​(1)=T~i​(0)\tilde{T}_{i}(1)=\tilde{T}_{i}(0) for 1≤i≤n1\leq i\leq n.

Third, with transformed potential event and censoring times, for each unit ii, the corresponding observed time at risk becomes Wi,cW_{i,c}, and the observed event indicator is still Δi\Delta_{i}.

From the above, the theorem follows from Theorems 4 and 5 in 4 applied to the transformed potential event and censoring times. ∎

Remark 2.

Standard randomization inference transforms potential outcomes under a sharp null. We extend this by also transforming potential censoring times. This ensures the realized time at risk and event indicator are fully determined under the null, as the observed value min⁡{Ti​(z),Ci​(z)}\min\{T_{i}(z),C_{i}(z)\} depends on both.

3.2 Multiplicative factor

A natural alternative to the additive shift is to suppose that the treatment scales every potential event time by a common factor. Define the sharp null hypothesis

Hρ:Ti​(1)=Ti​(0)​ρ,1≤i≤n,H_{\rho}:\ T_{i}(1)=T_{i}(0)\rho,\quad 1\leq i\leq n, (1)

for some ρ>0\rho>0. When ρ>1\rho>1 the treatment prolongs survival (event times are longer under treatment); when ρ<1\rho<1 it shortens survival.

Under HρH_{\rho} we rescale the control-arm observed times by ρ\rho. Specifically, let

Wi,ρ={Wi,Zi=1,Wi​ρ,Zi=0,W_{i,\rho}=\begin{cases}W_{i},&Z_{i}=1,\\ W_{i}\rho,&Z_{i}=0,\end{cases}

and let LRρ\textsc{LR}_{\rho} denote the log-rank statistic computed from {(Zi,Δi,Wi,ρ):1≤i≤n}\{(Z_{i},\Delta_{i},W_{i,\rho}):1\leq i\leq n\}. Define, for 1≤i≤n1\leq i\leq n,

T~i​(1)=Ti​(1),T~i​(0)=Ti​(0)​ρ,C~i​(1)=Ci​(1),C~i​(0)=Ci​(0)​ρ.\tilde{T}_{i}(1)=T_{i}(1),\qquad\tilde{T}_{i}(0)=T_{i}(0)\rho,\qquad\tilde{C}_{i}(1)=C_{i}(1),\qquad\tilde{C}_{i}(0)=C_{i}(0)\rho.
Theorem 2.

Under HρH_{\rho} for any ρ>0\rho>0, if Assumptions 1 and 2 hold and the regularity conditions of 4 hold for the transformed potential event times {(T~i​(1),T~i​(0))}i=1n\{(\tilde{T}_{i}(1),\tilde{T}_{i}(0))\}_{i=1}^{n} and the transformed potential censoring times {(C~i​(1),C~i​(0))}i=1n\{(\tilde{C}_{i}(1),\tilde{C}_{i}(0))\}_{i=1}^{n}, then

LRρ|𝑻⁡(1),𝑻⁡(0)→𝑑N⁡(0,1).\textsc{LR}_{\rho}\mid\boldsymbol{T}(1),\boldsymbol{T}(0)\xrightarrow{d}N(0,1).
Proof.

The proof mirrors that of Theorem 1.

First, Assumptions 1 and 2 still hold after replacing the original potential event and censoring times by the transformed potential event and censoring times.

Second, under HρH_{\rho}, Fisher’s null of no treatment effect holds for the transformed potential event times. That is, T~i​(1)=T~i​(0)\tilde{T}_{i}(1)=\tilde{T}_{i}(0) for 1≤i≤n1\leq i\leq n.

Third, with the transformed potential event and censoring times, for each unit ii, the corresponding observed time at risk becomes Wi,ρW_{i,\rho}, and the observed event indicator is still Δi\Delta_{i}.

From the above, the theorem follows from Theorems 4 and 5 of 4 applied to the transformed potential event and censoring times. ∎

Remark 3.

The parameter ρ\rho in HρH_{\rho} is a distribution-free time-acceleration factor. ρ>1\rho>1 means treatment multiplies every unit’s event time by ρ\rho, prolonging survival, while ρ<1\rho<1 shortens it. Unlike estimates from parametric AFT models, ρ\rho requires no distributional assumption and is valid under randomization alone.

4 Construction

An α\alpha-level test of HcH_{c} (and HρH_{\rho}, respectively) is obtained by rejecting when |LRc|>zα/2|\textsc{LR}_{c}|>z_{\alpha/2} (or |LRρ|>zα/2|\textsc{LR}_{\rho}|>z_{\alpha/2}), where zα/2z_{\alpha/2} is the upper α/2\alpha/2 quantile of a standard normal distribution. By test inversion, a (1−α)(1-\alpha) confidence set for the true additive shift c∗c^{*} is

𝒞add={c:|LRc|≤zα/2},\mathcal{C}_{\mathrm{add}}=\bigl\{c:|\textsc{LR}_{c}|\leq z_{\alpha/2}\bigr\},

where for c<0c<0, LRc\textsc{LR}_{c} is computed after switching treatment and control labels, as discussed in Remark 1. A (1−α)(1-\alpha) confidence set for the true multiplicative factor ρ∗\rho^{*} is

𝒞mult={ρ>0:|LRρ|≤zα/2}.\mathcal{C}_{\mathrm{mult}}=\bigl\{\rho>0:|\textsc{LR}_{\rho}|\leq z_{\alpha/2}\bigr\}.
Corollary 1.

Under the assumptions of Theorems 1 and 2, the confidence sets 𝒞add\mathcal{C}_{\mathrm{add}} and 𝒞mult\mathcal{C}_{\mathrm{mult}} have asymptotic coverage at least 1−α1-\alpha.

4.1 Computation

In practice the confidence sets are computed by evaluating the log-rank pp-value over a fine grid of candidate parameter values and retaining those for which the pp-value exceeds α\alpha. For the additive shift, one searches over a grid c∈{cmin,…,cmax}c\in\{c_{\min},\ldots,c_{\max}\}; for the multiplicative factor one searches over a grid on the log scale, ρ∈{exp⁡(ℓ):ℓ∈{ℓmin,…,ℓmax}}\rho\in\{\exp(\ell):\ \ell\in\{\ell_{\min},\ldots,\ell_{\max}\}\}.

Point estimates are obtained as the value of cc (or ρ\rho) that maximizes the log-rank pp-value, i.e., the value most consistent with the observed data.

4.2 Interpretation

The additive shift cc is expressed on the original time scale and quantifies the number of time units by which treatment delays the event. The multiplicative factor ρ\rho quantifies the factor by which treatment scales event times, so that ρ>1\rho>1 indicates prolonged survival and ρ<1\rho<1 indicates shortened survival. The multiplicative factor ρ\rho is the same estimand as the acceleration factor in an AFT model, but unlike model-based AFT inference, its validity derives from the randomization distribution alone.

Both parameters have a natural connection to the Kaplan–Meier plot. Under HcH_{c}, shifting the control arm’s time axis right by cc should approximately recover the treatment arm’s curve. Under HρH_{\rho}, stretching the control arm’s time axis by ρ\rho should do the same. Overlaying the transformed control curve on the Kaplan–Meier plot provides a visual check of whether a constant-effect summary is adequate for the data at hand.

4.2.1 Connection to the Hazard Ratio

The hazard ratio from a Cox proportional hazards model operates on the hazard scale [1], while the multiplicative factor ρ\rho operates on the time scale. Since the hazard ratio is so commonly reported in practice, it may be useful to draw a connection between the two. The multiplicative factor ρ\rho estimates the factor by which treatment multiplies event times, whereas the hazard ratio estimates the factor by which treatment multiplies the instantaneous event rate. While these quantities summarize different aspects of the treatment effect, a direct relationship arises under a Weibull model. Suppose event times follow a Weibull AFT model, so that under control

log⁡(T⁡(0))=μ+σ​ε,\log(T(0))=\mu+\sigma\varepsilon,

where ε\varepsilon has an extreme value distribution, implying that T⁡(0)∼Weibull⁡(γ=1/σ,λ=exp⁡(−μ))T(0)\sim\mathrm{Weibull}(\gamma=1/\sigma,\lambda=\exp(-\mu)) [3]. Under a constant multiplicative treatment effect as in (1), T⁡(1)=T⁡(0)​ρT(1)=T(0)\rho. The baseline hazard is

h0​(t)=λ​γ​(λ​t)γ−1,h_{0}(t)=\lambda\gamma(\lambda t)^{\gamma-1}, (2)

and under the time rescaling T⁡(1)=T⁡(0)​ρT(1)=T(0)\rho, the hazard under treatment is then

h1​(t)=ρ−1​h0​(t/ρ).h_{1}(t)=\rho^{-1}h_{0}(t/\rho). (3)

Substituting the Weibull form from (2) in (3) yields

h1​(t)=ρ−γ​h0​(t).h_{1}(t)=\rho^{-\gamma}h_{0}(t).

Thus, the hazard ratio is HR=h1(t)/h0(t)=ρ−γ=ρ−1/σ\mathrm{HR}=h_{1}(t)/h_{0}(t)=\rho^{-\gamma}=\rho^{-1/\sigma}. In the special case where T⁡(0)T(0) follows an exponential distribution, γ=1\gamma=1 and this simplifies to HR=1/ρ\mathrm{HR}=1/\rho so that the hazard ratio is simply the reciprocal of the acceleration factor. In general, the acceleration factor and hazard ratio summarize different, though related, aspects of the treatment effect.

5 Simulations

We conducted a simulation study to evaluate the finite-sample operating characteristics of the proposed randomization-based confidence intervals for the multiplicative effect parameter ρ\rho, and to compare their performance with standard parametric AFT model-based inference.

We considered two data-generating processes to compare the approaches when the parametric model was correctly specified and misspecified. In the first data-generating mechanism, baseline event times were drawn from a Weibull distribution,

T⁡(0)∼Weibull⁡(γ=1.5,λ=100),T(0)\sim\mathrm{Weibull}(\gamma=1.5,\lambda=100),

corresponding to a setting in which the Weibull AFT model is correctly specified. In the second mechanism, baseline event times were drawn from a log-logistic distribution,

T⁡(0)∼LogLogistic⁡(α=4,β=100),T(0)\sim\mathrm{LogLogistic}(\alpha=4,\beta=100),

which induces misspecification of the Weibull AFT likelihood.

In both cases, treatment assignment was generated as Z∼Bernoulli⁡(0.5)Z\sim\mathrm{Bernoulli}(0.5), and a constant multiplicative treatment effect was imposed via T⁡(1)=T⁡(0)​ρT(1)=T(0)\rho. We considered two values of the treatment effect, ρ∈{1.0,1.25}\rho\in\{1.0,1.25\}, where ρ=1\rho=1 corresponds to the null hypothesis of no treatment effect and ρ=1.25\rho=1.25 represents a beneficial effect that increases event times under treatment. Independent right censoring was generated from a uniform distribution on [0,θ][0,\theta], where θ\theta was calibrated separately for each scenario to achieve target censoring rates of approximately 20%, 50%, and 80%.

For each simulated dataset, we constructed confidence intervals using two approaches. The first is the proposed nonparametric randomization-based method, obtained by inverting the log-rank test over a fine grid of candidate values of ρ\rho. The second is a parametric approach based on a Weibull AFT model fit by maximum likelihood, with Wald-type confidence intervals constructed on the log scale and exponentiated to obtain intervals for ρ\rho.

We considered sample sizes n∈{50,200}n\in\{50,200\}. For each combination of data-generating process, sample size, censoring rate, and true parameter value, we generated 3,000 simulated datasets. Performance under the null (ρ=1\rho=1) was evaluated via Type I error, defined as the proportion of intervals failing to contain the true value. Performance under the alternative (ρ=1.25\rho=1.25) was evaluated via coverage probability and median interval width.

5.1 Results

Under the null, the randomization-based intervals maintained Type I error close to the nominal 5% level across both data-generating processes, sample sizes, and censoring rates (Figure 1). The Weibull AFT intervals also controlled Type I error well under correct specification, but exhibited inflated Type I error under the log-logistic data-generating process. Under the alternative, both methods achieved comparable coverage when the Weibull model was correctly specified (Figure 2), with the parametric approach yielding slightly narrower intervals on average (Figure 3). Under misspecification, the Weibull AFT intervals showed degraded coverage, whereas the randomization-based intervals remained close to the nominal 95% level across all scenarios. Overall, the results highlight a trade-off between efficiency and robustness in that parametric AFT methods offer gains in precision under correct specification, while the proposed randomization-based procedure provides reliable inference across a broader class of data-generating mechanisms.

Refer to caption
Figure 1: Type I error of 95% confidence intervals for the randomization-based and Weibull AFT methods under the null (ρ=1\rho=1), across censoring rates (20%, 50%, 80%), sample sizes (n∈{50,200}n\in\{50,200\}), and data-generating processes based on 3,000 simulations per scenario. The dotted horizontal line marks the nominal 5% level.
Refer to caption
Figure 2: Empirical coverage of 95% confidence intervals for the randomization-based and Weibull AFT methods under the alternative (ρ=1.25\rho=1.25), evaluated across censoring rates (20%, 50%, 80%), sample sizes (n∈{50,200}n\in\{50,200\}), and data-generating processes based on 3,000 simulations per scenario. The dotted horizontal line marks the nominal 95% level.
Refer to caption
Figure 3: Median width of 95% confidence intervals for the randomization-based and Weibull AFT methods under the alternative (ρ=1.25\rho=1.25), evaluated across censoring rates (20%, 50%, 80%), sample sizes (n∈{50,200}n\in\{50,200\}), and data-generating processes based on 3,000 simulations per scenario.

6 Real Data Example

We illustrate the proposed CIs using data from a randomized trial of recombinant human deoxyribonuclease I (rhDNase) for the treatment of cystic fibrosis [9]. Here, the primary endpoint is time to the first pulmonary exacerbation. The dataset is available as rhDNase in the survival package for R [8, 10]. Of the n=647n=647 enrolled subjects, we use the n=641n=641 with positive observed times (six subjects had an infection at enrollment and are excluded). Code 1 provides R code to prepare the dataset.

Code 1: R code to prepare rhDNase dataset.
library(survival)
dat_first <- subset(rhDNase, !duplicated(id))
dat <- data.frame(
Y = ifelse(!is.na(dat_first$ivstart), dat_first$ivstart,
as.numeric(dat_first$end.dt - dat_first$entry.dt)),
Z = dat_first$trt,
event = as.integer(!is.na(dat_first$ivstart))
)
dat <- dat[dat$Y > 0, ] # exclude subjects infected at enrollment

Of the 641 subjects, 323 were randomized to placebo (Z=0Z=0) and 318 to rhDNase (Z=1Z=1), with 138 and 103 events respectively. The log-rank test gives p=0.0056p=0.0056, providing evidence that rhDNase delays pulmonary exacerbation.

We apply the test-inversion procedure of Section 4 at the α=0.05\alpha=0.05 level, searching over a grid of 1001 values of c∈[−80,80]c\in[-80,80] days for the additive shift. The additive point estimate is 50.150.1 days with 95% CI [17.1, 73.0][17.1,\,73.0] days, indicating that rhDNase delayed the time to first exacerbation by between roughly two and ten weeks, with a point estimate of about 50 days. Code 2 includes an R function to estimate the additive effect.

Code 2: R function to estimate the additive treatment effect
ci_additive <- function(data, time, treatment, event,
lower, upper, alpha = 0.05, ngrid = 1001) {
grid_c <- seq(lower, upper, length.out = ngrid)
levels <- unique(data[[treatment]])
trt_label <- levels[1]
ctrl_label <- levels[2]
pval <- vapply(grid_c, function(c) {
t <- data[[time]]
z <- data[[treatment]]
e <- data[[event]]
# If c <= 0, flip treatment labels
if (c <= 0) {
z <- ifelse(z == trt_label, ctrl_label, trt_label)
c <- -c
}
t[z == 0] <- t[z == 0] + c
survdiff(Surv(t, e) ~ z, rho = 0)$pvalue
}, numeric(1))
data.frame(
est = grid_c[which.max(pval)],
lower = min(grid_c[pval > alpha]),
upper = max(grid_c[pval > alpha])
)
}
ci_additive(dat, "Y", "Z", "event", -80, 80)
#| est lower upper
#| 1 50.08 17.12 72.96

To estimate the multiplicative factor, we apply the test-inversion procedure of Section 4 at the α=0.05\alpha=0.05 level and search over a grid of 1001 values of ρ\rho on a log scale over [e−3,e3][e^{-3},e^{3}]. The multiplicative point estimate ρ^=1.55\hat{\rho}=1.55 with 95% CI [1.14,1.89][1.14,1.89] suggests that rhDNase increases the time to event by a factor of 1.551.55. In other words, treatment is estimated to extend time to event by about 55% on a multiplicative time scale. Code 3 includes an R function to estimate the multiplicative effect.

Code 3: R function to estimate the multiplicative treatment effect
ci_multiplicative <- function(data, time, treatment, event,
log_lower, log_upper,
alpha = 0.05, ngrid = 1001) {
grid_rho <- exp(seq(log_lower, log_upper, length.out = ngrid))
pval <- vapply(grid_rho, function(rho) {
t <- data[[time]]
z <- data[[treatment]]
e <- data[[event]]
t[z == 0] <- t[z == 0] * rho
survdiff(Surv(t, e) ~ z, rho = 0)$pvalue
}, numeric(1))
data.frame(
est = grid_rho[which.max(pval)],
lower = min(grid_rho[pval > alpha]),
upper = max(grid_rho[pval > alpha])
)
}
ci_multiplicative(dat, "Y", "Z", "event", -3, 3)
#| est lower upper
#| 1 1.55 1.14 1.89

As mentioned in Section 4.2, the adequacy of a constant-effect summary can be assessed visually by transforming the control arm’s Kaplan–Meier curve and checking whether it tracks the treatment arm. Figure 4 overlays two such transformations: the control curve shifted right by c^=50\hat{c}=50 days (additive) and the control curve with its time axis stretched by ρ^=1.55\hat{\rho}=1.55 (multiplicative), so that a step at time tt is replotted at t+c^t+\hat{c} or t​ρ^t\hat{\rho} respectively. The multiplicative rescaling tracks the treatment arm more closely across the follow-up period than the additive shift, supporting the use of ρ^=1.55\hat{\rho}=1.55 as the preferred summary of the treatment effect. Code 4 includes R code to create such a plot.

Code 4: R code to overlay the time-transformed control arm curves on the Kaplan–Meier plot.
library(ggsurvfit)
library(ggplot2)
# Main K-M plot
km_fit <- survfit2(Surv(Y, event) ~ Z, data = dat)
# Control arm data for transformations
km_control <- survfit2(Surv(Y, event) ~ 1,
data = subset(dat, Z == 0)) |>
tidy_survfit()
km_mult <- km_control |> transform(time = time * 1.55)
km_add <- km_control |> transform(time = time + 50)
km_fit |>
ggsurvfit() +
geom_step(
data = km_mult,
aes(x = time, y = estimate),
linetype = "dashed",
inherit.aes = FALSE
) +
geom_step(
data = km_add,
aes(x = time, y = estimate),
linetype = "dotted",
inherit.aes = FALSE
) +
scale_ggsurvfit(x_scales = list(limits = c(0, 189)))
Refer to caption
Figure 4: Kaplan–Meier survival curves for the rhDNase trial. The solid lines show the estimated survival functions for the control (blue) and rhDNase (orange) arms. The dashed line shows the control arm’s curve with its time axis stretched by ρ^=1.55\hat{\rho}=1.55 (multiplicative); the dotted line shows the control arm’s curve shifted right by c^=50\hat{c}=50 days (additive). The closer agreement of the multiplicative transformation with the treatment arm curve suggests that a constant time-acceleration factor is a more adequate summary of the treatment effect than a constant additive shift.

For ease of implementation, we have created a Shiny application, available at: https://lucy.shinyapps.io/survival_ci.

7 Discussion

We describe two nonparametric confidence intervals for summarizing treatment effects for randomized trials with time-to-event endpoints, one for an additive shift and one for a multiplicative factor. Both are obtained by inverting the log-rank test under sharp null hypotheses of constant effects, inheriting the randomization-validity established by 4 without requiring any model for the time-to-event distribution.

A strength of the proposed approach is its conceptual alignment with existing nonparametric approaches used in practice. The log-rank test and Kaplan–Meier estimator are standard tools for survival analysis in randomized trials, yet neither provides a summary metric of the overall effect magnitude. The additive and multiplicative CIs proposed here are computed directly from the same log-rank statistic already often reported, require no additional distributional assumptions, and remain valid under the randomization distribution alone.

A related test-inversion approach was proposed by 5, who build on work by 6 to construct a confidence interval for the hazard ratio by inverting the partial-likelihood score test under the Cox proportional hazards model. Their method shares the property that the confidence interval excludes the null value if the log-rank test is significant, and it yields narrower and more accurate intervals than the standard Wald confidence interval. However, their procedure targets the hazard ratio, a parameter whose interpretation relies on the proportional hazards assumption, and validity depends on correct model specification. By contrast, the confidence intervals proposed here target an additive shift or multiplicative factor and require no assumptions for the event-time distribution. While both utilize the log-rank test, the distinction is that our approach requires fewer assumptions, deriving its validity from the randomization distribution alone.

Both parameters summarize the treatment effect by a single scalar and therefore are most meaningful when the effect is constant across time. In the presence of treatment effect heterogeneity, the Kaplan–Meier curves themselves along with measures such as restricted mean survival time may be more informative. Alternatively, the constant-effect assumption could be relaxed by considering subgroup analyses, should the subgroups be known.

A limitation is that the proposed CIs will generally be wider than their parametric counterparts when a parametric model is correctly specified. Because the log-rank statistic is rank-based, it discards the magnitude of the observed times and uses only their ordering. A correctly specified Weibull or log-normal AFT model, by contrast, exploits the full likelihood and will yield a more precise estimate of the acceleration factor ρ\rho under that model. This efficiency loss is a trade-off for robustness in that the nonparametric CIs are valid regardless of the event-time distribution. Practitioners who are confident in a parametric family may prefer the narrower intervals it affords.

Although our randomization-based justification requires assumptions on the censoring mechanism (specifically, noninformative i.i.d. censoring as stated in Assumption 2), it places no stochastic assumptions on the potential event times. In contrast, the classical asymptotic theory for the log-rank test treats the event times as stochastic and requires independent/noninformative censoring, while allowing more general censoring schemes than i.i.d. censoring [2]. Consequently, even in settings where the censoring assumptions underlying our randomization-based analysis fail, the proposed procedure may still admit a valid classical large-sample justification under an appropriate superpopulation model for the event times. In this sense, the procedure exhibits a form of robustness to modeling assumptions, since the randomization-based and classical asymptotic justifications rely on different sources of stochastic structure and impose assumptions on different components of the data-generating process.

In summary, the proposed confidence intervals offer a nonparametric complement to the log-rank test and Kaplan–Meier plots for summarizing time-to-event treatment effects in randomized trials. They are easy to compute using standard R tools, directly interpretable on clinically meaningful scales, and grounded in the same randomization-validity framework as the log-rank test itself. We hope the accompanying Shiny application makes them accessible to a broad audience of applied researchers.

8 Data Availability

Code to reproduce all figures and results can be found on Github: https://github.com/LucyMcGowan/2026-nonparametric-survival.

References

  • Cox (1972) D. R. Cox Regression models and life-tables. Journal of the royal statistical society: Series B (methodological) 34 (2), pp. 187–202. Cited by: §1, §4.2.1.
  • Gill (1980) R. D. Gill Censoring and stochastic integrals. Statistica Neerlandica 34 (2), pp. 124–124. Cited by: §7.
  • Kalbfleisch and Prentice (2002) J. D. Kalbfleisch and R. L. Prentice The statistical analysis of failure time data. 2nd edition, Wiley. Cited by: §4.2.1.
  • Li and Small (2023) X. Li and D. S. Small Randomization-based test for censored outcomes: a new look at the logrank test. Statistical Science 38, pp. 92–107. Cited by: §1, §1, §2, §3.1, §3.2, §7, Theorem 1, Theorem 2, Abstract.
  • Lin et al. (2016) D. Lin, L. Dai, G. Cheng, and M. O. Sailer On confidence intervals for the hazard ratio in randomized clinical trials. Biometrics 72 (4), pp. 1098–1102. Cited by: §7.
  • Peto et al. (1977) R. Peto, M. Pike, P. Armitage, N. E. Breslow, D. Cox, S. Howard, N. Mantel, K. McPherson, J. Peto, and P. Smith Design and analysis of randomized clinical trials requiring prolonged observation of each patient. ii. analysis and examples. British journal of cancer 35 (1), pp. 1–39. Cited by: §7.
  • Rosenbaum (2020) P. R. Rosenbaum Design of observational studies. Vol. 2, Springer. Cited by: §1.
  • Terry M. Therneau and Patricia M. Grambsch (2000) Terry M. Therneau and Patricia M. Grambsch Modeling survival data: extending the Cox model. Springer, New York. External Links: ISBN 0-387-98784-3 Cited by: §6.
  • Therneau and Hamilton (1997) T. M. Therneau and S. A. Hamilton RhDNase as an example of recurrent event analysis. Statistics in medicine 16 (18), pp. 2029–2047. Cited by: §6.
  • Therneau (2024) T. M. Therneau A package for survival analysis in r. Note: R package version 3.8-3 External Links: Link Cited by: §6.
  • Wei (1992) L. Wei The accelerated failure time model: a useful alternative to the cox regression model in survival analysis. Statistics in medicine 11 (14-15), pp. 1871–1879. Cited by: §1.