Abstract
This work presents novel and powerful tests for comparing non-proportional hazard functions, based on sample–space partitions. Right censoring introduces two major difficulties, which make the existing sample–space partition tests for uncensored data non-applicable: (i) the actual event times of censored observations are unknown and (ii) the standard permutation procedure is invalid in case the censoring distributions of the groups are unequal. We overcome these two obstacles, introduce invariant tests, and prove their consistency. Extensive simulations reveal that under non-proportional alternatives, the proposed tests are often of higher power compared with existing popular tests for non-proportional hazards. Efficient implementation of our tests is available in the R package KONPsurv, which can be freely downloaded from CRAN.
Keywords
1 Introduction
For the task of comparing survival distributions of two or more groups using censored data, the logrank test is the most popular choice. Its optimality properties under proportional-hazard functions are well known. Although the logrank test is asymptotically valid, it may not be powerful when the proportional hazards assumption does not hold. There are varieties of situations in which the hazard functions are of non-proportional shape. For example, a medical treatment might have adverse effects in the short run, yet effective in the long run, or a treatment may be short-term beneficial but gradually lose its effect with time. In such scenarios, the hazard functions cross. In general, the longer the follow-up period is, the more likely it is for various non-proportional scenarios to develop. 1
Other tests have been proposed that might be better choices for non-proportional hazards under the alternative. Peto and Peto 2 proposed a test, which is similar to the logrank test, but more sensitive for differences in hazards at early survival times than at late ones. Pepe and Fleming3,4 suggested a weighted Kaplan–Meier (KM) test with a weight function consists of the geometric average of the two censoring survival-function estimators. Yang and Prentice 1 recently proposed another weighted logrank test whose weights are obtained by fitting their model, 5 which includes the proportional hazards and the proportional odds models as special cases. In contrast to the logrank and other related tests, the test of Yang and Prentice 1 uses adaptive weights. Under proportional hazards alternatives, this new adaptively weighted logrank test is optimal. When the hazards are non-proportional, the adaptive weights typically lead to improvement in power over the logrank test. The test of Yang and Prentice, 1 referred here as the Yang–Prentice test, is currently considered to be the leading one in terms of power, under a wide range of non-proportional hazards alternatives. However, this test is applicable only for two-sample problems. Moreover, it is not invariant to group labeling. Exchanging the group labels between treatment and control would result in a different p-value. Thus, in applications with no clear link between the groups to treatment/control labeling, such as in testing the differences between females and males, the Yang–Prentice test in its current form is inappropriate. In Section 3.2., we suggest an invariant version of the Yang–Prentice test.
In the statistical literature of K-sample tests for non-censored data, there exist powerful consistent tests that are based on various sample–space partitions. These include the well-known Kolmogorv–Smirnov and Cramer–von Mises tests,
6
and the Anderson–Darling (AD) family of statistics.7,8 In particular, Thas and Ottoy
9
showed that the K-sample AD test is basically an average of Pearson statistics in
In this work, we present new powerful non-parametric and invariant tests for comparing two or more survival distributions using right-censored data. Our proposed methodology is demonstrated and applied using the specific sample–space partition of Heller et al., 10 which has been shown to be very powerful with 3 or less densities’ intersections, 11 under non-censored data. Right-censored data introduce two major difficulties: (i) the actual event times of censored observations are unknown; and (ii) the standard permutation procedure of label shuffling is invalid, in case the censoring distributions of the groups are unequal. We overcome these two obstacles and introduce novel consistent powerful tests for right-censored data. Additionally, we provide a robust powerful test under non-proportional or proportional hazards, based on the principle of minimum p-value and the Cauchy-combination test of Liu and Xie. 12 The power of our robust test is compared with the test of Lee, 13 which is based on the maximum of two weighted logrank test statistics, and the MaxCombo test 14 based on the maximum of the logrank and three weighted logrank test statistics.
2 K-sample tests based on sample–space partition
2.1 Motivation and notation
Let X be a one-dimensional non-negative random variable,
K random samples
Interestingly, with no censoring, the Alr’s,

sample–space partition.
In general, for Y i = k, we get
For each pair (i, j), a 2 × 2 contingency table can be constructed with
To introduce the right-censored data, let
2.2 The test statistic
Let
Define
Only pairs of observed failure times are used for the sample–space partitioning (i.e.
2.3 The permutation procedure
Allegedly, a permuted test can be done based on random permutations of the group labels. However, if the censoring distributions of the K groups are different, such a permutation test is invalid, since a significant result can be yielded under the null due to differences in the censoring distributions. In order to generate random permutations that are independent of Y, we adopt the imputation approach suggested by Wang et al. 15
The main idea consists of randomly permuting the group labels, while for each observation assigned to a group different from the original one; a censoring time is imputed from the censoring distribution of the new assigned group. If the observation was originally censored, a survival time is also imputed, from the null survival distribution. Let
When performing a permutation test, the reported p-value can be viewed as an approximation of the true p-value, based on all possible permutations. In the above imputation-based permutation procedure, additional variability in a p-value is expected due to random imputations. To reduce this variability, multiple imputations can be used, such that for each random imputation, B permutations are generated. Assume M imputations are used. Then the p-value is defined as the fraction of the test statistics among the MB test statistics that are at least as large as the observed test statistic Q.
In the following theorem, it is argued that our proposed tests are consistent against all alternatives. The proof is presented in details in the Supplementary Materials.
Let X be a positive failure time random variable, either continuous or discrete, and Y be a categorical random variable with K categories. Let
2.4 Computation time
Table 1 provides the run time of the proposed tests of one dataset, K = 2, under the null hypothesis, one imputation, and 1000 permutations, for different total sample sizes n and
Computation time (seconds).
3 Simulation study
3.1 Simulation design
An extensive numerical study has performed to systematically examine the behavior of our proposed K-sample omnibus non-proportional hazards (KONP) tests under a wide range of two-sided alternatives, various sample sizes, and a wide range of censoring distributions, including unequal censoring distributions. The main part of the simulation study was dedicated to the popular two-sample setting, but settings of K = 3, 4, 5 were considered as well.
As competitors under the 2-sample setting, the following tests were included: the logrank test; Peto–Peto weighted logrank test 2 that uses a weight function that is very close to the pooled KM estimator; Pepe–Fleming weighted KM test 3 with geometric mean of the two KM censoring-distribution estimators as a weight function; and Yang–Prentice test, an adaptive weighted logrank test where the adaptive weights utilize the hazard ratio obtained by fitting the model of Yang and Prentice. 5 The tests of Uno et al. 16 are invalid under unequal censoring distributions (as demonstrated below), and thus are not included in the following power comparisons.
Table 2 (main text) and Tables 4 and 5 in Appendix 1, provide a comprehensive summary of the 17 non-proportional hazards scenarios and 7 proportional or close to proportional hazards functions, that were studied. For each scenario, the failure and censoring distributions are explicitly provided, and the survival functions of the two groups are plotted. A reference is provided indicating the source of each setting. In short, Scenario A shows differences at mid time points, but similarity in early and late times. Scenarios B–D shows differences in early times. Scenario E is of equal survival functions at early times and of proportional hazards at mid and late times. Scenarios F and G are with crossing hazards. Scenario H is of a U-shape hazards ratio. Scenarios I, J and K are with crossing hazards, based on the following hazards-ratio model of Yang and Prentice
5
Unequal censoring distributions.
For each scenario described above, four different censoring distributions were considered, two with equal and two with unequal censoring distributions. Under equal censoring distributions, the censoring distributions were taken to be similar to the corresponding referenced paper. Exponential distributions were used for all other scenarios, with ∼25% or 50% censoring rates. Under unequal censoring distributions, the censoring distributions of Wang et al.
15
were used (Table 2). The specific values of
Each of the configurations was studied with n = 100, 200, 300 or 400, n1 = n2, and performances are summarized based on 2000 replications.
A smaller simulation study was done for K > 2. As competitors, the logrank and Peto-Peto tests were included. For the null scenario K = 3, 4, 5 were studied, and under Scenarios D and J-2, K = 3 was examined. Various sample sizes and a wide range of censoring distributions were considered. A detailed description of these scenarios can be found in the Supplementary Materials.
3.2 The test of Yang and Prentice 1
Since the Yang–Prentice test is the strongest competitor in terms of power, for the to-sample setting, we highlight some of its properties. The Yang–Prentice test is based on Model (1), where the indices 1 and 2 indicate the control and treatment groups, respectively. Since this model is asymmetric in terms of F1 and F2, the test is not group-label invariant. By exchanging the group labels between “treatment” and “control,” a different p-value would be provided. This property is unique to this test, and all other tests considered in this work are invariant to group labeling. Consequently, in applications with no clear link between the two groups to treatment/control status (e.g. comparing females versus males, or young versus old), it is unclear how the Yang–Prentice test should be applied.
In order to make the Yang–Prentice test invariant, we apply a permutation test based on the minimum p-value of the two labeling options. Specifically, let PV1 and PV2 be the p-values of the Yang–Prentice tests based on
The original Yang–Prentice test (implemented in the R package YPmodel) uses the asymptotic distribution of the test statistic under the null hypothesis. Often, its empirical size is greater than the nominal level, especially under small sample size (see the Supplementary Material). In a recent work of Yang, 17 which deals with interim monitoring using adaptive weighted log-rank test, the author suggests using the re-sampling method of Lin et al. 18 instead of the original asymptotic approach, 18 for improving the type I error rate. The method of Lin et al. 18 is also based on asymptotic results. Alternatively, the imputation approach of Wang et al. 15 works very well in very small sample sizes, and it does not require asymptotic distribution. To make the comparison between the methods consistently, we use the imputation approach for both, our proposed method and the invariant version of Yang–Prentice test.
3.3 Simulation results
Figure 2 provides the empirical power of the tests under the null hypothesis, with equal and unequal censoring distributions. Evidently, under equal censoring distributions all the tests are valid, as the empirical size of the tests are reasonably close to the nominal value 0.05. On the other hand, under the null hypothesis and unequal censoring distributions, the empirical sizes of Uno et al. tests are much higher than the nominal value 0.05. For example, under a sample size of n = 400, and censoring rates of ∼27% and 55%, the empirical size of Uno et al. V2 bona fide test is 0.099; all the other Uno et al. tests’ sizes are even higher. The empirical sizes of all the other tests are reasonably close to their nominal value. Thus, Uno’s tests will not be considered in the rest of this simulation study.

Empirical power under the null: top: equal censoring rates; bottom: unequal censoring rates.
Figure 3 summarizes the empirical power of the tests under settings generated by others, while Figure 4 is based on scenarios generated by us. As expected, the power of each test increases with the sample size. In some scenarios the power of the tests increases as the censoring rate increases, since in these settings the non-censored data are centered mainly at the parts of the hazards, which are closer to proportionality and the censored data are mainly located at the non-proportionality area of the hazards. For example, in Scenario I-3 with n = 400, as the censoring rate increases from about 25% to about 50%, the power of Peto–Peto increases by 0.159, Yang–Prentice by 0.2, Pepe–Fleming by 0.218, and logrank by 0.4. The power increase in our KONP tests is much smaller, 0.012 and 0.009.

Simulation Results of non-proportional hazards settings considered by others: Setting (a) shows differences at mid time points, but similarity in early and late times. (b) to (d) show differences in early times. (e) It is of equal survival functions at early times and of proportional hazards at mid and late times. Scenarios (f) and (g) are with crossing hazards under model (1). Scenario (h) is of a U-shape hazards ratio.

Simulation results of additional settings of non-proportional hazards: Scenarios I-1, I-2 and I-3 are with crossing hazards under Model (1). In I-1 the hazard functions cross earlier compared to I-2 and I-3. Scenarios J-1, J-2 and J-3 are with crossing hazards in which the strong monotonicity assumption is violated. In J-1 and J-2, the hazards are piece-wise proportional, and the hazard functions cross in mid time points. In Scenario J-3, the hazard ratio is a continuous function of t, and the hazards cross at a late time point. Under Scenarios K-1, K-2 and K-3, Model (1) is violated, but the strong monotonicity assumption of
Evidently, our KONP tests are often more powerful compared to all other tests. These includes scenarios A, C, D, E, F, J-1, J-2, J-3, I-1, K-1, K-2, K-3. The superiority of KONP over Yang–Prentice under F and I-1 is surprising, since these scenarios follow their Model (1). For example, with n = 400 and 25% censoring rate, the empirical power is about 90% for KONP tests and only 70% for Yang–Prentice. In Scenario G (close to proportional hazards), which also follows Model (1), the results of Yang–Prentice and logrank are similar and often slightly better than KONP tests. In scenarios J-1 and J-2 our tests are substantially more powerful than all the competitors. For example, in Scenario J-2, n = 400, and 25% censoring rate, KONP tests with about 95% power, while the second most powerful test is Yang–Prentice with a power of 48%.
In scenarios G, I-2 and in some of the censoring rates in I-3, the Peto–Peto and Pepe–Fleming tests tend to be with the highest power. In contrast, in many of the scenarios in which the survival functions cross, their power is much lower than our tests. For example, in Scenario K-1, n = 400, and 25% censoring rate, the power of KONP is 89%, while Pepe–Fleming power is 42% and Peto–Peto is 5%.
To conclude, for the 2-sample setting, in most of the non-proportional hazards settings, our proposed KONP tests tend to be more powerful than the other tests, and the differences between SP and SLR are very small, if any.
Results of settings with K > 2 can be found in Table S1 and Figure S1 of the Supplementary Material. Based on these results we conclude that all the tests are valid, as the empirical size of the tests are reasonably close to 0.05. For K = 3 and scenarios D and J-2, we see similar results to those shown with K = 2, as KONP tests are often much more powerful than the logrank and Peto–Peto test. For example, for scenario D with n = 200 and 25% censoring rates in all the three groups, the powers of KONP tests are ∼92%, while of Peto–Peto is 49%, and of logrank is 18%.
Figure 5 summarizes the power of the two-sample tests under proportional hazards or close to proportionality. Under these settings, the logrank test is often with the highest power among the invariant tests, as expected. The invariant version of Yang–Prentice test is similar to the logrank test, and the proposed KONP tests, sometimes, have less power.

Empirical power the two-sample settings under proportional hazards or close to proportionality: Scenario L is with proportional hazards. M is close to proportionality but with substantial differences at early times. N–Q are close to proportionality and model (1).
3.4 A robust approach
Figures 3 and 4 of the main text and Table S2 of the Supplementary Material indicate that under the non-proportional hazards scenarios and among the invariant tests, usually the proposed KONP tests are with the largest power. Under proportional hazards or close to proportionality, usually the logrank test is with the largest power among the invariant tests. The invariant version of Yang–Prentice test is similar to the logrank test under proportional hazards settings, since their model contains the proportional hazards model (
In case one is interested in a robust powerful test under non-proportional or proportional hazards, the principle of minimum p-value could be adopted based on the elegant Cauchy-combination test of Liu and Xie,
12
which is similar to the test based on the minimum p-value. Denote the p-values of our KONP tests by
The candidate tests to be included in Cau are powerful tests under non-proportional (i.e. KONP tests) or proportional hazards (i.e. logrank test and the invariant version of Yang–Prentice test). Due to the similarity in power performances between the logrank test and the invariant version of Yang–Prentice test, under proportional or close to proportional hazards, and due to the high computational burden of Yang–Prentice invariant test, only the logrank test is included.
Figure 6 provides the empirical Type-I error of the two KONP tests, the logrank test and the robust Cau test. Evidently, the size of the tests are reasonably close to 0.05. Figures 7 and 8 summarize the empirical power, based on 1000 replications, of the two KONP tests, the logrank test, the test statistic Cau, along with two additional combined test: the test of Lee 13 and the MaxCombo test. 14 The test of Lee 13 is based on the maximum of two weighted logrank test statistics; and the MaxCombo test 14 is based on the maximum of the logrank and three weighted logrank test statistics. (See Supplementary Materials for details.) Table S4 of the Supplementary Materials provides the power values of these tests. Often, the Cau test loses some power comparing to the largest power among KONP, logrank and the other two combined tests, but the loss is relatively small. Lee and MaxCombo tests perform very similarly. In general, our Cau test outperforms Lee and the MaxCombo tests, in terms of power, in all the sub-scenarios (i.e. various sample size and censoring patterns) of type B, C, H, J-1, and J-2; and in some of the sub-scenarios of A, F, I-1, I-2, I-3, K-1, K-2, K-3, and P. All of these are non-proportional hazards scenarios. Under proportional hazards or close to proportionality, i.e. settings L, M, N, O, P, and Q, Lee’s test or MaxCombo outperform Cau. Interestingly, in the cases where Lee or MaxCombo tests are with higher power than Cau, the power loss by using Cau is relatively small; while this is not always the case when Cau outperforms Lee or MaxCombo. For example, under Setting B with n = 200, the power of Cau equals 0.919 while the power values of Lee and MaxCombo are 0.499 and 0.450, respectively.

Empirical power under the null of the two-sample KONP tests, logrank and the Cau robust test.

Empirical power under the null of the two-sample KONP tests, logrank, Cau, Lee (2007) and MaxCombo tests: Scenarios A through I-3.

Empirical power under the null of the two-sample KONP tests, logrank, Cau, Lee (2007) and MaxCombo tests: Scenarios J-1 through Q.
Our R package KONPsurv 19 applies the above robust test Cau as well.
4 Real data examples
4.1 The gastrointestinal tumor data
The Gastrointestinal Tumor Study Group 20 compared chemotherapy with combined chemotherapy and radiation therapy, in the treatment of locally unresectable gastric cancer. This dataset was used in Yang and Prentice 1 to demonstrate the utility of their test. Each treatment arm had 45 patients, and two observations of the chemotherapy group and six of the combination group were censored. The primary outcome measure was time to death. The KM survival curves of time to death, in each treatment group are provided in Figure 9. To apply the Yang–Prentice test, we considered chemotherapy as the control group and chemotherapy plus radiation therapy as the treatment group, which is named Yang–Prentice 1. The Yang–Prentice test with reversed group labeling is denoted by Yang–Prentice 2. Table 3 shows the p-values of testing for equality of the survival curves of time to death, of the two treatment groups, against a two-sided alternative, with each of the tests considered in the simulation study. For our tests and the Yang-Prentice invariant test, 10 imputations and 10 4 permutations for each imputation, were used. Evidently, the smallest p-values are observed under our proposed KONP tests and the Cauchy-combination test Cau.

Gastrointestinal tumor study: KM curves.
Examples: GST and UCD.
GST: gastrointestinal tumor study; UCD: urothelial carcinoma data.
4.2 Urothelial carcinoma
Few options exist for patients with locally advanced or metastatic urothelial carcinoma after progression with platinum-based chemotherapy. Powles et al. 21 aimed to assess the safety and efficacy of atezolizumab versus chemotherapy in this patient population. Their study consists of a multi-center, open-label, phase three randomized controlled trial conducted at 217 academic medical centers and community oncology practices mainly in Europe, North America, and the Asia-Pacific region. The primary endpoint was overall survival. Figure S3 of the Supplementary Material of Powles et al. 21 provides the overall survival KM curves of atezolizumab versus chemotherapy based on 316 and 309 patients, respectively. Although the detailed survival data are unavailable, inspired by Roychoudhury et al., 22 we used Guyot et al. 23 algorithm that maps from digitized curves back to KM data, by finding numerical solutions to the inverted KM equations, using available information on number of events and numbers at risk. The DigitizeIt software was used for reading the coordinates of the KM curves from the published graph. Figure 10 provides the KM curves by treatment arm, and the last column of Table 3 shows the p-values of testing for equality of the survival curves of time to death against a two-sided alternative. Evidently, the smallest p-values are observed under our proposed KONP tests and the second best is the test of Lee. Our Cauchy combined test also performs robustly.

Urothelial carcinoma data: KM curves.
5 Discussion and conclusions
The proposed KONP tests are based on partition of the sample–space into two subsets, corresponding to three intervals, as of the HHG test. 10 An extensive simulation study shows that when the hazard curves are non-proportional, the KONP tests are often more powerful than all the other tests. In particular, the proposed test is even more powerful than the Yang–Prentice test, under their model with non-proportional hazards. The simulation results show very little differences in power, if any, between the Pearson chi-squared test statistic and the log-likelihood ratio statistic. Since the chi-squared statistic is slightly more powerful, this test statistic is recommended. The proposed Cau test is often more powerful than the other combined tests, such as Lee and MaxCombo tests.
The diverse set of censoring settings considered in this work reflects the complex effect of a censoring distribution on the power: the power of a specific test under a given scenario is not necessarily increasing as the censoring rate decreases.
Other partitions and summary statistics can be easily adopted. In particular, one may consider the extended AD tests of Thas and Ottoy 9 and Heller et al. 11 with higher sample–space partitions and test statistics that aggregate over all partitions by summation or maximization. Nevertheless, for non-censored data, Heller et al. 11 showed by simulations (see their Table 1), that increasing the number of partitions can improve power over the HHG 2-sample test under settings in which the density functions intersect 4 times or more. Otherwise, the HHG 2-sample test tends to be more powerful. Figure 11 in Appendix I displays the densities of the 17 non-proportional hazards scenarios studied in this work. Evidently, the survival scenarios considered by others and by us are of less than four intersections. Simulation study of the AD test statistic with sample–space partition of two intervals, yields lower power than the proposed KONP tests. A comprehensive comparison with other sample–space partitions and aggregations could be a topic of future research.
This work suggests tests that accommodate right-censored data. Since the tests are based on the KM estimator, it seems that a modification to left truncation might be possible. However, additional work is required to modify the imputation-permutation approach for left-truncated data.
Implementation of our tests, KONP-P, KONP-LR, and Cau, is available in the R package KONPsurv, 19 which can be freely downloaded from CRAN.
Supplemental Material
SMM907355 Supplemental Material - Supplemental material for K-sample omnibus non-proportional hazards tests based on right-censored data
Supplemental material, SMM907355 Supplemental Material for K-sample omnibus non-proportional hazards tests based on right-censored data by Malka Gorfine, Matan Schlesinger and Li Hsu in Statistical Methods in Medical Research
Footnotes
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.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: NIH (R01CA189532) and the U.S.-Israel Binational Science Foundation (2016126).
Supplementary material
Supplementary material available at SMMR online includes: (1) The proof of the theorem. (2) Description of some of the tests included in the simulation study. (3) Description and results of K-sample simulation settings with K = 3, 4, 5. (4) Plots of the empirical power results of the robust test Cau. (5) The exact empirical power used for generating all the plots in the main text and the Supplementary Material file.
Appendix 1. Detailed description of the simulation settings
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
