<figure><img src="image_1.png" /></figure>

HAL
open science

# Designing clinical trials for the comparison of single and multiple quantiles with right-censored data

Beatriz Farah, Olivier Bouaziz, Aurélien Latouche

► To cite this version:

Beatriz Farah, Olivier Bouaziz, Aurélien Latouche. Designing clinical trials for the comparison of single and multiple quantiles with right-censored data. 2025. hal-05052387v2

HAL Id: hal-05052387

https://hal.science/hal-05052387v2

Preprint submitted on 16 Oct 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
# Designing clinical trials for the comparison of single and multiple quantiles with right-censored data

Beatriz Farah<sup>1,2</sup>, Olivier Bouaziz<sup>2,3,*</sup>, Aurélien Latouche<sup>1,4,*</sup>

## Abstract

Based on the test for equality of quantiles originally introduced by Kosorok (1999), we propose new power formulas for the comparison of one quantile between two treatment groups, as well as for the comparison of a collection of quantiles. Under the null hypothesis of equality of quantiles, the test statistic follows asymptotically a normal distribution in the univariate case and a $\chi^2$ with $J$ degrees of freedom in the multivariate case, with $J$ the number of quantiles compared. The variance of the test statistic depends on the estimation of the probability density function of the distribution of failure times at the quantile being tested. In order to apply the test on real data, we propose to estimate this quantity using a resampling-based method, as an alternative to Kosorok's original kernel density estimator. The whole procedure provides a practical tool for designing and analyzing data arising from clinical trials using quantiles of survival as an endpoint. Simulation studies are performed to show the appropriateness of the power formulas. We illustrate the proposed test in a phase III randomized clinical trial where the proportional hazards assumption between treatment arms does not hold.

## Keywords

Censored data, Nonparametric methods, Clinical trial design, Nonproportional hazards, Sample size, Power

## Corresponding author:

Beatriz Farah, Institut Curie, INSERM U1331, Mines Paris Tech, Paris/ Saint-Cloud, France

Email: beatriz.farah@math.cnrs.fr

<footnote n="1"><sup>1</sup>Institut Curie, INSERM U1331, Mines Paris Tech, Paris/ Saint-Cloud, France</footnote>

<footnote n="2"><sup>2</sup>Université Paris Cité, CNRS, MAP5, F-75006 Paris, France</footnote>

<footnote n="3"><sup>3</sup>Univ. Lille, CNRS, UMR 8524 - Laboratoire Paul Painlevé, F-59000 Lille, France</footnote>

<footnote n="4"><sup>4</sup>Conservatoire National des Arts et Métiers, Paris, France</footnote>

<footnote><sup>*</sup>These authors contributed equally to this work.</footnote>
# 1 Introduction

In clinical studies with right-censored data, investigators have been increasingly interested in estimating the quantiles of the survival times, which are defined as being the smallest time when survival exceeds a threshold of interest¹,². As this measure is expressed in the timescale, the quantification of the benefit of one treatment arm over the other can be easily communicated and understood by clinicians and patients, in contrast to relative risk measures such as the hazard ratio which can be easily misinterpreted³,⁴. In addition to allowing the benefit, if any, of the new treatment to be expressed in terms of time gained compared to the standard of care, the use of quantiles allows for robustness against outliers and does not depend on the shape of the survival distribution or the proportionality of the treatment effect. In particular, in immuno-oncology trials the usual assumption of proportional hazards between treatment arms is often not verified due to the delayed effect of immunotherapy and late separation of survival curves¹. Given that the quantification of treatment effects using differences in quantiles inherently accounts for nonproportional hazards, this approach is particularly well-suited for such scenarios.

Few methods have been developed to compare quantiles of the survival function in the presence of censored data. Brookmeyer and Crowley (BC)⁵ proposed a pooled-weighted Kaplan-Meier estimation approach in order to detect differences in the median survival times among several treatments. In order to avoid the estimation of the densities of the time-to-event in each treatment group, the authors proposed a simplified test statistic, which is only valid under the assumption that the survival distributions are equal in each group under the null hypothesis. However, testing for homogeneity of survival distributions is much stronger than testing for equality of survival medians. Indeed, identical survival distributions imply equal median survival times, while the converse is not true. Therefore, type I error is inflated when distributions differ between treatment groups for this method, which makes its application to real data limited.

The BC test was modified by Tang and Jeong⁶, who employed contingency tables as an alternative to calculating the inverse of the BC test statistic in order to avoid estimating the density distribution of failure times. Rahbar et al.⁷ proposed another nonparametric test, similar to the BC test, but where the difficulty of estimating the density is addressed by using the bootstrap approach to obtain the asymptotic variance of the test. In general these nonparametric methods have inflated type I error rates, which make their use limited in practice, especially when the sample sizes are small⁸. Another extension of the BC test has been proposed by Chen and Zhang⁸. However, like all aforementioned methods, this test can only be applied to compare one quantile at a time and authors do not propose an explicit calculation of the power of the test. Moreover, these previous works do not address the formulation of clinical trials, which is a key aspect in the context of sample size estimation and in analyzing the impact of design parameters on the power of the test.

A versatile method for evaluating treatment effects by comparing pre-specified quantiles in each treatment group was proposed by Kosorok⁹. The author derived a nonparametric two-sample test for the comparison of quantiles that allows for testing the equality of multiple quantiles as well as testing the equality of one single quantile obtained at multiple analysis times. The test also applies to general censoring schemes, such as double censoring for instance, and several kinds of empirical distribution estimators. It can also be directly applied to group sequential clinical designs with staggered patient entry.
Nevertheless, the practical application of this method is limited by the absence of explicit power formulas and minimal sample size calculations. In this work, we fill this gap by deriving the necessary expressions, thereby extending Kosorok's method and enabling its use in clinical trial design.

Moreover, the estimation of the variance of the test statistic depends on the value of the density of survival at the quantile of interest. Kosorok proposed the use of kernel density estimators in order to complete this task. A drawback of this approach is that it requires the estimation of the density at all points and relies on an unknown bandwidth parameter, which has an impact on the estimator's performance¹⁰. To address this issue, we propose a resampling approach inspired by Lin et al.¹¹ to estimate the density directly at the point of interest without requiring a bandwidth parameter.

The full development of this procedure is presented in Farah et al.¹², with additional details provided in the Supplemental Material. In that work, the performance of both density estimation methods was compared, showing that the resampling-based method outperformed the alternative in terms of mean squared error (MSE).

Under Kosorok's framework, the key contribution of our work is the explicit derivation of closed-form formulas for the asymptotic power of the test for both univariate and multivariate quantile comparisons.

This advancement enables a novel approach to clinical trial planning and minimum sample size calculation. Another highlight of our work is the refinement of the Kosorok test through a resampling-based method for density estimation.

This paper is organized as follows. First, we present the theoretical results for the univariate and multivariate tests of equality of quantiles. Next, we derive analytical power of the test in the context of planning clinical trials with known survival distributions. We then present applications of the method to a lung cancer dataset from the OAK randomized clinical trial¹³, where we illustrate its use in comparing both single and multiple quantiles. We conclude with a discussion.

## 2 Methods

We consider a two-arms clinical trial, where $n_1$ patients are randomly allocated to treatment group 1 and $n_2$ to treatment group 2. We observe for each patient $i \in \{1, ..., n_k\}$, $k = 1, 2$, the observed times $T_{ik} = \min(\tilde{T}_{ik}, C_{ik})$ and censoring status $\delta_{ik} = \mathbb{1}_{\tilde{T}_{ik} \le C_{ik}}$, where $\tilde{T}_{ik}$ are the continuous times of interest and $\tilde{C}_{ik}$ the censoring times. Let $n = n_1 + n_2$ and $\hat{\mu}_k = n_k/n$, we assume that $\hat{\mu}_k$ converges to an element $\mu_k$ in $(0, 1)$. We also assume that the event times $\tilde{T}_{1k}, ..., \tilde{T}_{nk}$ and the censoring times $C_{1k}, ..., C_{nk}$ are independent, for $k = 1, 2$. Let $F_k$ be the cumulative distribution function of failure times in each treatment arm with $f_k$, $\Lambda_k$ and $S_k$ the density, cumulative hazard and survival functions, respectively. We denote the survival function of the observed times $T_{ik}$, as $H_k$. We define the usual inverse distributions as $F_k^{-1}(p) = \inf\{t : F_k(t) \ge p\}$, $k = 1, 2$, for a given probability $p \in (0, 1)$. Following Kosorok⁹, we require the densities at the quantiles to be positive for both treatment groups. We also suppose that there exists $\epsilon > 0$ such that $H_k(F_k^{-1}(p) + \epsilon) > 0$, $k = 1, 2$. This condition is needed to ensure sufficient follow-up in order to be able to estimate each quantile of interest.

We denote as $\hat{F}_k$, $k = 1, 2$, the Kaplan-Meier estimator of $F_k$, from which we derive $\hat{F}_k^{-1}(p)$, the estimator of the inverse distributions at $p$. Our method is based on the asymptotic distribution of $\hat{F}_k^{-1}(p)$ as derived in Kosorok⁹. In this work, the asymptotic variance depends on the density at the quantile $F_k^{-1}(p)$, which needs to be estimated in order to construct a statistical test. This estimator is denoted by
$\hat{f}_k$ which we propose to estimate by either kernel density estimation or a resampling procedure inspired by Lin et al.¹¹

The resampling method, developed in Farah et al.¹², consists of generating multiple realizations of the centered Gaussian variable with variance $\sigma_{\epsilon}^2$, and then performing the least squares estimation which gives directly an estimation of the density at the quantile of interest $F_k^{-1}(p)$ for a given probability $p$ and group $k$. We propose an automatic grid-search algorithm in order to choose the variance of the generated Gaussian. Our procedure has the advantage of providing an estimation of the density directly at the point of interest, contrary to kernel density estimation which requires an estimation at all data points. Indeed, it is well known¹⁴ that kernel density estimators have a slow rate of convergence (in particular, slower than the parametric rate $n^{-1/2}$), that depends on the regularity of the density. For instance, if the density is assumed to be differentiable, then the rate of convergence is of order $n^{-1/3}$ for an optimal bandwidth of order $n^{-1/3}$.

On the other hand, estimating a parameter, such as the density at a single point, may allow for a faster rate of convergence. Further details on the resampling and kernel density methods are provided in Supplemental Material and in Farah et al.¹²

## 2.1 Univariate test

We are interested in testing the null hypothesis $H_0: F_1^{-1}(p) = F_2^{-1}(p)$ against the alternative hypothesis $H_1: F_1^{-1}(p) - F_2^{-1}(p) = \Delta$, for a difference in quantiles $\Delta \in \mathbb{R}, \Delta \neq 0$. Such a null hypothesis allows to investigate the benefit, if any, of the experimental arm over the control arm at a given quantile. Assuming the conditions outlined in Section 2 hold for groups $k = 1, 2$, it follows from Lemma 1 from Kosorok⁹, with theoretical derivations detailed in Supplemental Material,

$$ \sqrt{n}(\hat{F}_k^{-1}(p) - F_k^{-1}(p)) \xrightarrow{d} \mathcal{N} \left( 0, (1-p)^2 \frac{\phi_k}{\mu_k f_k(F_k^{-1}(p))^2} \right) \text{ as } n \to \infty, $$

where

$$ \phi_k = \int_0^{F_k^{-1}(p)} \frac{d\Lambda_k(x)}{H_k(x)}. $$

We prove in Supplemental Material that under $H_0$,

$$ \sqrt{n}(\hat{F}_1^{-1}(p) - \hat{F}_2^{-1}(p)) \xrightarrow{d} \mathcal{N}(0, \sigma^2) \text{ as } n \to \infty, $$

where

$$ \sigma^2 = (1-p)^2 \left( \frac{\phi_1}{\mu_1 f_1(F_1^{-1}(p))^2} + \frac{\phi_2}{\mu_2 f_2(F_2^{-1}(p))^2} \right). $$

We propose the following test statistic for the univariate test of equality of quantiles:

$$ \begin{aligned} \mathcal{T}_n &= \sqrt{n} \frac{\hat{F}_1^{-1}(p) - \hat{F}_2^{-1}(p)}{\hat{\sigma}}, \quad \text{with} \\ \hat{\sigma}^2 &= (1-p)^2 \left( \frac{\hat{\phi}_1}{\hat{\mu}_1 \hat{f}_1(\hat{F}_1^{-1}(p))^2} + \frac{\hat{\phi}_2}{\hat{\mu}_2 \hat{f}_2(\hat{F}_2^{-1}(p))^2} \right), \end{aligned} $$
where $\hat{\phi}_1$ and $\hat{\phi}_2$ are obtained by the usual Greenwood's estimate of the Kaplan-Meier variance, and $\hat{f}_1(\hat{F}_1^{-1}(p))$, $\hat{f}_2(\hat{F}_2^{-1}(p))$ are consistent estimators for the densities, such as kernel density estimators or the resampling procedure inspired by Lin et al.¹¹

Then the following results hold:

1. Under $\mathcal{H}_0: F_1^{-1}(p) = F_2^{-1}(p)$, $T_n \xrightarrow{d} \mathcal{N}(0, 1)$ as $n \to \infty$.

2. Under $\mathcal{H}_1: F_1^{-1}(p) - F_2^{-1}(p) = \Delta$, $T_n - \sqrt{n}\frac{\Delta}{\hat{\sigma}} \xrightarrow{d} \mathcal{N}(0, 1)$ as $n \to \infty$.

For a test with type I error $\alpha$ and power $1 - \beta$, as $n$ goes to infinity,

$$P_{\mathcal{H}_0}(|T_n| > q_{1-\frac{\alpha}{2}}) \to \alpha,$$

where $q_{1-\frac{\alpha}{2}}$ is the quantile of order $1 - \alpha/2$ of the standard normal distribution.

Let $\Phi$ be the cumulative distribution function of the standard normal distribution. From the asymptotic distribution of $T_n$ under $\mathcal{H}_1$, we derive the following asymptotic formula for the power of the test:

$$1 - \beta \approx 1 - \Phi \left( q_{1-\frac{\alpha}{2}} - \frac{\sqrt{n}}{\hat{\sigma}} \Delta \right) + \Phi \left( -q_{1-\frac{\alpha}{2}} - \frac{\sqrt{n}}{\hat{\sigma}} \Delta \right).$$

Details and proofs can be found in Supplemental Material.

## 2.2 Multivariate test

We now present general results for multivariate two-sample tests of equality of quantiles. The proofs are provided in Supplemental Material. We aim to test, for a given $J$, the null hypothesis $\mathcal{H}_0: F_1^{-1}(p_j) = F_2^{-1}(p_j)$, $j = 1, \dots, J$ against the alternative hypothesis $\mathcal{H}_1: F_1^{-1}(p_j) - F_2^{-1}(p_j) = \Delta_j, \exists j: \Delta_j \neq 0$.

Assuming the conditions outlined in section 2 are satisfied, then for $k = 1, 2$:

$$\sqrt{n} \begin{bmatrix} \hat{F}_k^{-1}(p_1) - F_k^{-1}(p_1) \\ \vdots \\ \hat{F}_k^{-1}(p_J) - F_k^{-1}(p_J) \end{bmatrix} \xrightarrow{d} \mathcal{N}(0, \Upsilon_{F_k}) \text{ as } n \to \infty,$$

where:

$$(\Upsilon_{F_k})_{jl} = \begin{cases} \frac{(1-p_j)^2 \int_0^{F_k^{-1}(p_j)} \frac{d\Lambda_k(x)}{H_k(x)}}{\mu_k (f_k(F_k^{-1}(p_j)))^2}, & \text{if } j = l \\ \frac{(1-p_j)(1-p_l) \int_0^{F_k^{-1}(p_j) \wedge F_k^{-1}(p_l)} \frac{d\Lambda_k(x)}{H_k(x)}}{\mu_k f_k(F_k^{-1}(p_j)) f_k(F_k^{-1}(p_l))}, & \text{otherwise.} \end{cases}$$
It follows that, under $\mathcal{H}_0$,

$$ \mathcal{Z}_n = \sqrt{n} \begin{bmatrix} \hat{F}_1^{-1}(p_1) - \hat{F}_2^{-1}(p_1) \\ \vdots \\ \hat{F}_1^{-1}(p_J) - \hat{F}_2^{-1}(p_J) \end{bmatrix} \xrightarrow{d} \mathcal{N}(0, \Psi) \text{ as } n \to \infty, $$

where $\Psi = \Upsilon_{F_1} + \Upsilon_{F_2}$. In order to implement the test, we assume $\Psi$ to be invertible. For the multivariate test of equality of quantiles, our test statistic has the following form:

$$ \mathcal{F}_n = \mathcal{Z}_n^T \hat{\Psi}^{-1} \mathcal{Z}_n, $$

where $\hat{\Psi}$ is obtained by replacing each component by its estimate, as in the univariate case. Then the following results hold:

1. Under $\mathcal{H}_0: F_1^{-1}(p_j) = F_2^{-1}(p_j), j = 1, \dots, J, \mathcal{F}_n \xrightarrow{d} \chi_J^2$ as $n \to \infty$.

2. Under $\mathcal{H}_1: F_1^{-1}(p_j) - F_2^{-1}(p_j) = \Delta_j, j = 1, \dots, J, \mathcal{F}_n$ is asymptotically equivalent to $\chi_J^2(\Psi^{-1/2}\xi)$, an uncentered chi-squared distribution with $J$ degrees of freedom and mean $\Psi^{-1/2}\xi$, with

$$ \xi = \sqrt{n} \begin{bmatrix} \Delta_1 \\ \vdots \\ \Delta_J \end{bmatrix}. $$

The power of the multivariate test for equality of quantiles at level $\alpha$ as $n \to \infty$ expresses as:

$$ 1 - \beta \approx 1 - F_{\chi_J^2(\Psi^{-1/2}\xi)}(q_{J,1-\alpha}), $$

where $F_{\chi_J^2(\Psi^{-1/2}\xi)}$ is the cumulative distribution function of the uncentered chi-squared distribution with $J$ degrees of freedom and mean $\Psi^{-1/2}\xi$, and $q_{J,1-\alpha}$ denotes the quantile of order $1 - \alpha$ of the chi-squared distribution with $J$ degrees of freedom.

## 3 Illustration and results

The proposed method for univariate and multivariate tests for quantile comparison is relevant in two main application frameworks. First, it is useful in sample size planning scenarios where one is interested in designing a clinical trial to compare treatment effects in the quantile scale. In this case, our method enables the calculation of statistical power for a given sample size at a fixed significance level. Similarly, it can be used to determine the minimum sample size required to achieve sufficient power for a test at a fixed level. Second, the method can be applied when survival data from both control and experimental arms are available, and we are interested in testing the hypothesis of equality of quantiles between two survival distributions. Both applications are presented in this section.
## 3.1 Planning a clinical trial

The results derived in the previous section allow sample size and power calculations for tests of equality of quantiles in the context of planning clinical trials in the presence of censoring. Assuming known distributions for survival times and censoring, one can compute the explicit power obtained by the test, or in an equivalent way, derive the minimum sample size required in order to achieve a fixed power.

We present simulations to illustrate the planning of a clinical trial using the proposed test of equality of quantiles. Two versatile scenarios were considered in the subsequent results, inspired by Eaton et al.¹⁵, which allow to illustrate multiple realistic frameworks including proportional and nonproportional survival (Figure 1). Groups $k = 1, 2$ correspond to the control and experimental arm, respectively. In all scenarios, survival time in the control arm follows an exponential distribution with rate $\lambda_a$.

The survival time distribution in the experimental arm is specified as follows, for each simulation scenario:

* Scenario 1 (proportional hazards): Exponential with rate $\lambda_b$.

* Scenario 2 (late differences): Piecewise exponential with rate $\lambda_a$ until time $t_{cut}$ and $\lambda_b$ onward.

In all scenarios, the distribution of censoring time is exponential with rate $\lambda_{cens}$. Using the expression derived in the previous section, it is possible to compute the analytical power as a function of the parameters for each scenario.

Indeed, for a fixed difference in quantiles equal to $\Delta$, if both arms are exponential (scenario 1), one may deduce the expression for the rate of experimental arm as $\lambda_b = -\log(1-p)/(F_1^{-1}(p) - \Delta)$. Moreover, under independent censoring, it is possible to write the analytical expressions for the variance $\sigma^2$:

$$ \phi_1 = \frac{\lambda_a}{\lambda_a + \lambda_{cens}} (e^{(\lambda_a + \lambda_{cens})F_1^{-1}(p)} - 1) $$

$$ \phi_2 = \frac{\lambda_b}{\lambda_b + \lambda_{cens}} (e^{(\lambda_b + \lambda_{cens})F_2^{-1}(p)} - 1) $$

$$ \sigma^2 = \frac{(1-p)^2 \frac{\lambda_a}{\lambda_a + \lambda_{cens}} (e^{(\lambda_a + \lambda_{cens})F_1^{-1}(p)} - 1)}{\hat{\mu}_1 (\lambda_a e^{-\lambda_a F_1^{-1}(p)})^2} + \frac{(1-p)^2 \frac{\lambda_b}{\lambda_b + \lambda_{cens}} (e^{(\lambda_b + \lambda_{cens})F_2^{-1}(p)} - 1)}{\hat{\mu}_2 (\lambda_b e^{-\lambda_b F_2^{-1}(p)})^2} $$

These quantities allow us to have an explicit expression for the power of the test.

We derive similar results for the second scenario, where we observe nonproportional hazards and late treatment effects. We have the following expression for the quantile in the experimental arm:

$$ F_2^{-1}(p) = \begin{cases} -\frac{\log(1-p)}{\lambda_a}, & 0 \le p < 1 - e^{-\lambda_a t_{cut}} \\ t_{cut} - \left(\frac{\log(1-p)+\lambda_a t_{cut}}{\lambda_b}\right), & p \ge 1 - e^{-\lambda_a t_{cut}} \end{cases} $$

In order to ensure the realization of this scenario, we require that $F_1^{-1}(p) - t_{cut} > \Delta$, which is equivalent to $F_2^{-1}(p) > t_{cut}$ when specifying the parameters. For this scenario, we have the same $\phi_1$ as the one where both arms are exponential, while the expression for $\phi_2$ is now written as:

$$ \phi_2 = \frac{\lambda_a}{\lambda_a + \lambda_{cens}} (e^{(\lambda_a + \lambda_{cens})t_{cut}} - 1) + \left( \frac{\lambda_b}{\lambda_b + \lambda_{cens}} e^{(\lambda_a - \lambda_b)t_{cut}} \right) \left( e^{(\lambda_b + \lambda_{cens})F_2^{-1}(p)} - e^{(\lambda_b + \lambda_{cens})t_{cut}} \right). $$
<figure><img src="image_2.png" /><figcaption>**Figure 1.** Comparison of scenarios. Top row: Scenario 1 with true survival curves and power analyses. Bottom row: Scenario 2 with similar comparisons. The solid line represents the control arm and the dashed line represents the experimental arm.</figcaption></figure>

In all simulations we compare the medians in both groups and we assume that the number of patients in each arm is the same. We choose $\lambda_{cens}$ in order to have approximately 25% of censoring in each group. We fix the rate of the control group in both scenarios as $\lambda_a = 1.5$ and $t_{cut} = 0.2$ in scenario 2.

For these two scenarios, we assess the performance of the power formula on finite samples. For this, ten thousand simulations were performed to compare the asymptotic power obtained by the explicit formula to the empirical power obtained from simulations. Results shown in Table 1 confirm that the analytical formula provides a good approximation even with modest sample sizes and that type I error is well controlled.

As expected, increasing sample size yields empirical type I error and power values that are closer to the analytical ones.

One interest of the explicit power formula is its ability to compute the minimum sample size required in order to detect a fixed difference at a desired power. We illustrate this application by fixing a desired power and treatment effect and comparing the minimum sample size required for each scenario when testing for the equality of medians. The results are provided in Table 2.

Analytical power can be plotted at increasing quantile difference for various sample sizes, which is presented in Figure 2. Across both scenarios, power increases with sample size, as expected. Differences between treatment arms at the median are illustrated in scenario 2 for $\Delta \in [0, 0.25]$ in order to satisfy the condition $F_1^{-1}(p) - t_{cut} > \Delta$.
<table><caption>**Table 1.** Type I error and power of the test of equality of quantiles for sample sizes $n_i = 50, 100, 500$, at $p = 0.5$.</caption><thead><tr><th rowspan="2">Δ</th><th colspan="2">Scenario 1</th><th colspan="2">Scenario 2</th></tr><tr><th>Empirical</th><th>Formula</th><th>Empirical</th><th>Formula</th></tr></thead><tbody><tr><td colspan="5" style="text-align: center; font-weight: bold;">Sample size n<sub>i</sub> = 50</td></tr><tr><td>0</td><td>0.0103</td><td>0.05</td><td>0.0015</td><td>0.05</td></tr><tr><td>0.1</td><td>0.0504</td><td>0.1236</td><td>0.0174</td><td>0.1153</td></tr><tr><td>0.2</td><td>0.3507</td><td>0.4147</td><td>0.3908</td><td>0.4682</td></tr><tr><td colspan="5" style="text-align: center; font-weight: bold;">Sample size n<sub>i</sub> = 100</td></tr><tr><td>0</td><td>0.0257</td><td>0.05</td><td>0.0060</td><td>0.05</td></tr><tr><td>0.1</td><td>0.1583</td><td>0.2000</td><td>0.0991</td><td>0.1831</td></tr><tr><td>0.2</td><td>0.7280</td><td>0.6939</td><td>0.8645</td><td>0.7577</td></tr><tr><td colspan="5" style="text-align: center; font-weight: bold;">Sample size n<sub>i</sub> = 500</td></tr><tr><td>0</td><td>0.047</td><td>0.05</td><td>0.047</td><td>0.05</td></tr><tr><td>0.1</td><td>0.714</td><td>0.703</td><td>0.782</td><td>0.766</td></tr><tr><td>0.2</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td></tr></tbody></table>

<table><caption>**Table 2.** Minimal sample size per group.</caption><thead><tr><th rowspan="2">Power</th><th rowspan="2">Δ</th><th>Scenario 1</th><th>Scenario 2</th></tr><tr><th>Sample Size</th><th>Sample Size</th></tr></thead><tbody><tr><td rowspan="2">0.95</td><td>0.1</td><td>1047</td><td>901</td></tr><tr><td>0.2</td><td>214</td><td>173</td></tr><tr><td rowspan="2">0.90</td><td>0.1</td><td>846</td><td>729</td></tr><tr><td>0.2</td><td>173</td><td>140</td></tr><tr><td rowspan="2">0.80</td><td>0.1</td><td>632</td><td>545</td></tr><tr><td>0.2</td><td>129</td><td>105</td></tr></tbody></table>

The Supplemental Material provides additional simulation results, in particular for more extreme quantiles and higher censoring rates, along with the corresponding computational times for all scenarios.
<figure><img src="image_3.png" /><figcaption>**Figure 2.** Power for various differences in quantiles in scenarios 1 (on the left) and 2 (on the right).</figcaption></figure>

## 3.2 Application of the test on data from the OAK study

In this section, we apply the test of equality of quantiles to the OAK randomized phase III clinical trial, registered with ClinicalTrials.gov, number NCT02008227. This study was conducted to evaluate the efficacy and safety of the immunotherapy treatment atezolizumab compared with the standard of care chemotherapy docetaxel in patients with previously treated metastatic non-small-cell lung cancer. The primary efficacy analysis was performed in the first 850 of 1225 enrolled patients, recruited between March 11, 2014 and April 29, 2015. The primary endpoint of this multicentre randomized controlled trial was the overall survival, with approximately 30% of censored of observations at the time of analysis. Following Mboup et al.¹, we use reconstructed survival data generated by the algorithm developed in Rittmeyer et al.¹³ to emulate survival times for both treatment arms, enabling our analysis. The reconstructed Kaplan-Meier curves are seen in Figure 3.

The implementation of the test statistic requires the value of the density at the quantiles for both treatment arms.

To this end, two approaches for density estimation are compared: kernel density estimation and our resampling procedure inspired by Lin et al.¹¹, here referred to as KDE and LS respectively. The KDE method is described in Földes et al.¹⁶ and Diehl and Stute¹⁷, with additional details provided in the Supplemental Material. The LS method, presented in Farah et al.¹², consists of generating multiple samples of the zero-mean Gaussian variable with variance $\sigma_e^2$, from which the density at the quantile is directly estimated using least squares estimation. In practical applications, $\sigma_e^2$ is selected through a grid-search algorithm detailed in Farah et al.¹². In our implementation with the OAK clinical trial data, we draw 10³ zero-mean Gaussians, considering $\sigma_e$ values ranging from 0.1 to 10 in increments of 0.05. For the KDE method, the bandwidth parameter for the KDE is selected via leave-one-out cross-validation over candidate values ranging from 0.1 to 1 in increments of 0.02, with a Gaussian kernel.
<figure><img src="image_4.png" /><figcaption>**Figure 3.** Reconstructed Kaplan-Meier curves. The dashed lines represent the survival quantiles at probabilities 0.05, 0.1, 0.3, 0.5 and 0.7.</figcaption></figure>

**3.2.1 Application of the univariate test** We compute the power of the univariate test of equality of quantiles for OAK data. The test was applied at quantiles of order 0.3, 0.5 and 0.7, and differences between treatment arms are estimated for each quantile. The results are presented in Table 3. The values for the standard error of the resampled Gaussians selected by grid-search for the LS method are equal to 2.5, 1.9 and 2.3, respectively.

For all quantiles considered, patients treated with immunotherapy have a positive survival average benefit compared with patients treated with immunotherapy, which can be directly interpreted in terms of survival time. Taking the median, for instance, we may say that, on average, patients from the immunotherapy group have 50% of chance to survive 4.04 months more than patients in the chemotherapy group.

At the median, the test of equality of medians proposed in Tang and Jeong⁶ yields a *p*-value of 2.22 × 10⁻³ for this setting. By comparison, the LS method provides stronger statistical evidence at the median, while also being directly applicable to arbitrary quantiles and accommodating multivariate quantile inference, in contrast to the approach of Tang and Jeong.

<table><caption>**Table 3.** *p*-values and test statistics for LS and KDE methods for the univariate test.</caption><thead><tr><th rowspan="2">p</th><th rowspan="2">Δ̂</th><th colspan="2">p-value</th><th colspan="2">Test statistic</th></tr><tr><th>LS</th><th>KDE</th><th>LS</th><th>KDE</th></tr></thead><tbody><tr><td>0.3</td><td>-1.01</td><td>1.13 × 10<sup>-2</sup></td><td>8.49 × 10<sup>-2</sup></td><td>-2.53</td><td>-1.72</td></tr><tr><td>0.5</td><td>-4.04</td><td>5.03 × 10<sup>-4</sup></td><td>5.35 × 10<sup>-3</sup></td><td>-3.48</td><td>-2.79</td></tr><tr><td>0.7</td><td>-6.76</td><td>4.39 × 10<sup>-9</sup></td><td>5.05 × 10<sup>-7</sup></td><td>-5.87</td><td>-5.02</td></tr></tbody></table>
All methods lead to the same statistical conclusion of rejection of the null hypothesis at each of the tested quantiles. In all cases, the test with the LS method for density estimation yields the most significant *p*-values.

### 3.2.2 Application of the multivariate test
One advantage of the proposed test of equality of quantiles is its direct application for multivariate two-sample tests of equality of quantiles. In this section we present the results obtained for the comparison of pairs of quantiles, which can be generalized in order to compare any set of *J* quantiles. We apply the multivariate test to three pairs of quantiles: {(0.05, 0.1), (0.1, 0.5), (0.5,0.7)}. The results are provided in Table 4, where either KDE or LS were used for computing the density at the quantiles which are needed for the estimation of the matrix of variance-covariance of the test statistic. The standard error values selected in the LS method are 2.55, 2.3, and 1.5, corresponding respectively to the three considered pairs of quantiles.

<table><caption>**Table 4.** *p*-values and test statistics for LS and KDE methods for the multivariate test.</caption><thead><tr><th rowspan="2">p</th><th rowspan="2">Δ̂</th><th colspan="2">p-value</th><th colspan="2">Test statistic</th></tr><tr><th>LS</th><th>KDE</th><th>LS</th><th>KDE</th></tr></thead><tbody><tr><td>0.05, 0.1</td><td>-0.03, -0.06</td><td>9.83 × 10<sup>-1</sup></td><td>9.91 × 10<sup>-1</sup></td><td>0.03</td><td>0.02</td></tr><tr><td>0.1, 0.5</td><td>-0.06, -4.04</td><td>3.39 × 10<sup>-2</sup></td><td>1.18 × 10<sup>-1</sup></td><td>6.77</td><td>4.28</td></tr><tr><td>0.5, 0.7</td><td>-4.04, -6.76</td><td>4.61 × 10<sup>-6</sup></td><td>1.80 × 10<sup>-3</sup></td><td>24.58</td><td>12.65</td></tr></tbody></table>

The first row of Table 4 corresponds to the scenario where the null hypothesis is satisfied. In this case, the null hypothesis is not rejected by both methods with *p*-values close to 1. In the second row, we have a case where the difference of quantiles is close to zero (equal to 0.06 in absolute value) for one of the probabilities and close to 4 in absolute value for the other. For a test of level 0.05, one rejects the null hypothesis when using the LS method for density estimation and does not reject it when the density is estimated by the KDE procedure. This is the only case among the three scenarios where, depending on the density estimation procedure, the conclusion of the test changes. This suggests a loss of power for the KDE procedure, which might be explained by the increased variability in this method due to its need to estimate the density at all points.

Lastly, we explore a scenario where there is a marked difference in quantiles for both probabilities, equal in absolute value to 4.04 and 6.76 for the survival quantiles 0.5 and 0.7 respectively. In this case, both methods reject the null hypothesis, and the test using the LS density estimation yields the most significant *p*-value.

The multivariate test of equality of quantiles assesses whether multiple quantiles are simultaneously equal across treatment groups at a given time. When the null hypothesis of equality across all quantiles is rejected, it is often of interest to determine which specific quantiles account for the differences. In this case, following a reviewer's suggestion, we complement the global test with separate univariate tests for each quantile, adjusted using the Bonferroni correction. We illustrate this approach with the multivariate test applied to the quantiles {0.05, 0.1, 0.5, 0.7}. The grid-search algorithm, using the same grid as previously described, selects $\sigma_e^2 = 2.5$. The resulting test statistic is equal to 24.66, which yields a *p*-value of $5.87 \times 10^{-5}$, providing strong evidence against the null hypothesis of equal quantiles. To identify which quantiles differ between groups, we conduct univariate tests with Bonferroni correction. The standard deviations obtained from grid search for quantiles 0.05, 0.1, 0.5, and 0.7 are respectively
equal to 2.3, 1.65, 1.9, and 2.3. The corresponding adjusted *p*-values are 8.77 × 10⁻¹, 7.94 × 10⁻¹, 4.44 × 10⁻⁴, and 5.80 × 10⁻⁹. These results indicate that the null hypothesis is not rejected for the lower quantiles (0.05 and 0.1), but it is strongly rejected for the median (0.5) and upper quantile (0.7). The computational runtime for the multivariate test is approximately 24.21 seconds, while the total runtime for all four univariate tests combined is about 27.43 seconds. The proposed strategy offers a practical guideline, whereby the multivariate test evaluates whether global differences exist across quantiles, and the adjusted univariate tests localize those differences.

# 4 Discussion

In this paper we derived the analytical expressions for the power calculation for the univariate and multivariate tests of equality of quantiles proposed by Kosorok⁹. The explicit formulas can be used in different situations when evaluating the effects of a new treatment against standard of care, such as computing minimum sample size when planning clinical trials or comparing quantiles in the presence of clinical data. The power formula was analytically derived and its asymptotic behavior was studied in simulations for the scenarios where there are proportional and nonproportional hazards. The power formula can be derived for general situations, by assuming different distributions for survival and censoring. The proposed test was illustrated in the context of immuno-oncology trials with late treatment effects and nonproportional hazards. Estimation techniques are needed in order to perform the necessary power calculations for the test in presence of data. We showed the results obtained by using kernel density estimation as well as a resampling technique proposed in Farah et al.¹², with an improved power for the resampling approach.

Of note, the choice of quantiles for the test should be guided by clinical relevance and data availability, in order to ensure reliable estimation. In particular, high quantiles might not be reached or might be poorly estimated due to tail estimation problems if only few events are observed at late times.

One major advantage of our proposed method is that it allows for multivariate tests, which can be further extended to group sequential clinical trials with staggered entry of patients and several interim analyses. Furthermore, although the proposed test is designed for detecting the differences in quantiles of survival times, one could extend the power formulas in a co-primary endpoints context, where the goal is to assess the effect of a randomized treatment jointly on the hazard and a given quantile or on the restricted mean survival time (RMST)¹⁵ and a given quantile. Indeed, there is a subtle connection between RMST and percentile of survival because in practice, the choice of a clinically relevant restriction time imposes a percentile of survival. This is left to future research work.

# Funding

The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: Research in this article was supported by Ecole doctorale de Santé Publique, Université Paris-Saclay and Université de Versailles-Saint-Quentin-en-Yvelines.

# Declaration of conflicting interests

The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
**Code availability**

All data processing and statistical analysis were performed with the R statistical computing software version 4.3.2.

**Supplemental Material**

Supplemental Material for this article is available online.

**References**

1. Mboup B, Le Tourneau C, Latouche A. Insights for quantifying the long-term benefit of immunotherapy using quantile regression. *JCO precision oncology*. 2021;1:173-6.

2. Peng L. Quantile regression for survival data. *Annual review of statistics and its application*. 2021;8(1):413-37.

3. Hernán MA. The hazards of hazard ratios. *Epidemiology*. 2010;21(1):13-5.

4. Uno H, Wittes J, Fu H, Solomon SD, Claggett B, Tian L, et al. Alternatives to hazard ratios for comparing the efficacy or safety of therapies in noninferiority studies. *Annals of internal medicine*. 2015;163(2):127-34.

5. Brookmeyer R, Crowley J. A k-sample median test for censored data. *Journal of the American Statistical Association*. 1982;77(378):433-40.

6. Tang S, Jeong JH. Median tests for censored survival data; a contingency table approach. *Biometrics*. 2012;68(3):983-9.

7. Rahbar MH, Chen Z, Jeon S, Gardiner JC, Ning J. A nonparametric test for equality of survival medians. *Statistics in medicine*. 2012;31(9):844-54.

8. Chen Z, Zhang G. Comparing survival curves based on medians. *BMC Medical Research Methodology*. 2016;16:1-7.

9. Kosorok MR. Two-sample quantile tests under general conditions. *Biometrika*. 1999;86(4):909-21.

10. Heidenreich NB, Schindler A, Sperlich S. Bandwidth selection for kernel density estimation: a review of fully automatic selectors. *AStA Advances in Statistical Analysis*. 2013;97:403-33.

11. Lin C, Zhang L, Zhou Y. Conditional quantile residual lifetime models for right censored data. *Lifetime data analysis*. 2015;21:75-96.

12. Farah B, Latouche A, Bouaziz O. A note on a resampling procedure for estimating the density at a given quantile. *arXiv preprint arXiv:250902207*. 2025.

13. Rittmeyer A, Barlesi F, Waterkamp D, Park K, Ciardiello F, Von Pawel J, et al. Atezolizumab versus docetaxel in patients with previously treated non-small-cell lung cancer (OAK): a phase 3, open-label, multicentre randomised controlled trial. *The Lancet*. 2017;389(10066):255-65.

14. Silverman BW. Density Estimation Silverman. *Chapman, Hall/CRC*. 1986.

15. Eaton A, Therneau T, Le-Rademacher J. Designing clinical trials with (restricted) mean survival time endpoint: practical considerations. *Clinical Trials*. 2020;17(3):285-94.

16. Földes A, Rejtő L, Winter B. Strong consistency properties of nonparametric estimators for randomly censored data, II: Estimation of density and failure rate. *Periodica Mathematica Hungarica*. 1981;12(1):15-29.

17. Diehl S, Stute W. Kernel density and hazard function estimation in the presence of censoring. *Journal of Multivariate Analysis*. 1988;25(2):299-310.