Next Article in Journal
A Delayed Malware Propagation Model Under a Distributed Patching Mechanism: Stability Analysis
Previous Article in Journal
Stability Analysis of a Mathematical Model for Infection Diseases with Stochastic Perturbations
Previous Article in Special Issue
Hierarchical Multi-Scale Decomposition and Deep Learning Ensemble Framework for Enhanced Carbon Emission Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Goodness-of-Fit Test for Log-Linearity in Cox Proportional Hazards Model Under Monotonic Covariate Effects

Department of Mathematical Sciences, University of Texas at Dallas, Richardson, TX 75080, USA
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2025, 13(14), 2264; https://doi.org/10.3390/math13142264 (registering DOI)
Submission received: 30 December 2024 / Revised: 30 June 2025 / Accepted: 1 July 2025 / Published: 14 July 2025
(This article belongs to the Special Issue Statistical Analysis and Data Science for Complex Data)

Abstract

The Cox proportional hazards (PH) model is widely used because it models the covariates to the hazard through a log-linear effect. However, exploring flexible effects becomes desirable within the Cox PH framework when only a monotonic relationship between covariates and the hazard is assumed. This work proposes a partial-likelihood-based goodness-of-fit (GOF) test to assess the log-linear effect assumption in a univariate Cox PH model. Rejection of log-linearity suggests the need to incorporate monotonic and non-log-linear covariate effects on the hazard. Our simulation studies show that the proposed GOF test controls type I error rates and exhibits consistency across various scenarios. We illustrate the proposed GOF test with two datasets, breast cancer data and lung cancer data, to assess the presence of log-linear effects in the Cox PH model.

1. Introduction

The Cox proportional hazards (PH) model [1,2] is one of the most commonly applied survival analysis models since it effectively associates the covariates with the survival time through a hazard function. Since the hazard function is also known as the instantaneous risk of experiencing an event of interest, such as death, disease, or failure, given that the individual has survived to that point, the Cox PH model is also widely used in many areas, such as biology, medicine, and the social sciences.
The hazard function in the Cox PH model with time-independent covariates has the following functional form:
λ ( t | Z ) = λ 0 ( t ) exp ( Z β ) ,
where Z is a p × 1 vector of covariates, β is a p × 1 coefficient vector, and λ 0 ( t ) is a baseline hazard function. In (1), the proportional hazard and the log-linearity hazard are two key assumptions of practical interest. The proportional hazard suggests that the hazard ratio for different individuals only depends on the value of covariates and the model coefficient β . On the other hand, taking the logarithm of (1),
log λ ( t | Z ) = log λ 0 ( t ) + Z β .
The log-linearity hazard enables researchers to analyze the linear effect of every unit change in the covariate on the log of the hazard function.
While most of the existing literature focuses on testing the proportional hazards assumption [3,4], our primary focus is on validating the log-linearity assumption. This assumption is critical, as assessing its validity provides a foundation for exploring alternative monotonic effects when the log-linear effect may not hold. To this end, we propose a goodness-of-fit (GOF) test designed to evaluate the log-linearity assumption in the Cox PH model.
In the literature, martingale-based residual methods have been widely used to investigate and test the GOF for log-linearity. Therneau et al. [5] introduced a graphical approach using smoothed martingale residuals to examine the functional form of covariate effects. Lin et al. [6] proposed an analytical test for log-linearity based on partial cumulative sums of martingale residuals, providing asymptotic properties, such as the limiting Gaussian process of the residuals and the null distribution of the test statistics. However, the existing literature has not explicitly addressed testing log-linearity against monotonic effects.
In this work, we consider a univariate covariate Z and a monotonic function ϕ to explore the monotonic effect. Relaxing exp ( Z β ) in the Cox PH model to ϕ ( Z ) , Chung et al. [7] considered the isotonic PH model with a hazard function
λ ( t | Z ) = λ 0 ( t ) exp { ϕ ( Z ) } ,
which maintains the proportional hazard assumption. Similar to the estimation process in the traditional Cox PH model, Chung et al. [7] developed nonparametric partial-likelihood-based estimation for ϕ . Therefore, a ratio of partial likelihoods from the Cox and isotonic PH models is a natural test statistic for checking log-linearity. Inspired by Xu et al. [8], we propose a bootstrapping method conditional on covariates and censoring time to determine the critical values.
The remaining sections are organized as follows. Section 2 reviews the estimations in the Cox PH model and the isotonic proportional hazards models for a univariate time-independent covariate. In Section 3, we propose the GOF test for the Cox PH model under monotonicity constraints. We provide a numerical study in Section 4 to evaluate the performance of the GOF test. Lastly, in Section 5, we apply the proposed GOF test in two data examples, including a lung cancer study conducted by the North Central Cancer Treatment Group [9] and a breast cancer study conducted by the German Breast Cancer Study Group in the R package survival. All the R codes are available on GitHub https://github.com/cftang9/LLGOF_UniCoxPH, accessed on 30 June 2025.

2. Partial Likelihood Estimators

We assume that the survival time T i follows a continuous distribution F ( t | Z i ) associating with a covariate Z i R for t 0 , for i = 1 , , n . Let C i denote the censoring time. We observe that X i = min { T i , C i } with the censoring indicator Δ i = I ( T i C i ) , where I is an indicator function. We assume that T i and C i are independent and that C i follows a distribution G. Thus, the observed data consist of triplets { ( X i , Δ i , Z i ) } i = 1 n .
A univariate Cox PH model relates the hazard of T i and the covariate Z i as follows:
λ ( t | Z i ) = λ 0 ( t ) exp ( Z i β ) ,
where β R is a vector of coefficients and λ 0 ( t ) is a baseline hazard function invariant of covariates. The parameter β is estimated by maximizing the partial likelihood L C o x , given by
L C o x ( β ) = i = 1 n t 0 exp ( Z i β ) j = 1 n Y j ( t ) exp ( Z j β ) d N i ( t ) ,
where N i ( t ) = I ( X i t , Δ i = 1 ) are the counting processes indicating that the event of interest occurs at or before time t, and Y i ( t ) = I ( X i t ) are the at-risk processes that no events of interest or censoring occurs before time t. The log-partial-likelihood, denoted by C o x ( β ) , is given by
C o x ( β ) = i = 1 n 0 { Z i β log j = 1 n Y j ( u ) exp ( Z j β ) } d N i ( u ) .
The maximum partial likelihood estimator (MPLE) is denoted by β ^ = arg max β R C o x ( β ) and can be obtained numerically by the Newton–Raphson method.
When a monotonic covariate effect is preferable to a log-linearity effect in (2), it is natural to relax from exp ( Z i β ) to ϕ ( Z i ) , where ϕ is monotonic. Hence, λ ( t | Z i ) can be relaxed to
λ ( t | Z i ) = λ 0 ( t ) exp { ϕ ( Z i ) }
which is also known as the isotonic PH model [7]. Without loss of generality, we assume that ϕ ( · ) is a non-decreasing function. Under the isotonic PH model, the partial likelihood is slightly different. Define Z ( i ) as the ith-order statistic of Z i . Given a monotonic function ϕ , define ϕ i = ϕ ( Z ( i ) ) as the value of ϕ at Z ( i ) for i = 1 , , n , where n is the number of uncensored subjects, so that ϕ 1 ϕ n . We further denote ϕ = ( ϕ 1 , , ϕ n ) as the vector of parameters ϕ i and I i = [ Z ( i ) , Z ( i + 1 ) ) for i = 1 , , n 1 and I n = [ Z ( n ) , ) , which are the intervals formed by order statistics Z ( i ) * . Chung et al. [7] proposed the partial likelihood for the isotonic PH model (5) as
L I s o ( ϕ ) = i = 1 n t 0 exp ( ϕ i ) j = 1 n Y j ( t ) exp ( ϕ j ) d N i ( t ) ,
where the counting process N i ( t ) = i = 1 n I ( Z ( i ) t ) and the at-risk process Y j ( t ) = h R j Y h ( t ) , where R j = { h : Z h I j , h = 1 , . . . , n } . Hence, the log partial likelihood can be defined accordingly as
I s o ( ϕ ) = i = 1 n 0 ϕ i log j = 1 n Y j ( u ) exp ( ϕ j ) d N i ( u ) .
Note that I s o ( ϕ ) = I s o ( ϕ + c ) for any constant c. Due to the identifiability issue, restricting the monotonic function ϕ satisfying ϕ ( Z K ) = 0 for some Z K suffices. In this work, we consider Z K as the median of the covariates Z i as in Chung et al. [7]. They also developed a computationally efficient pseudo-iterative convex minorant algorithm to obtain the MPLE, denoted by ϕ ^ .

3. Goodness-of-Fit Test

Here, we propose a GOF test for the log-linearity in the Cox PH model (2) under the isotonic PH model (5). The null and alternative hypotheses, H 0 and H 1 , respectively, are defined as follows:
H 0 : ϕ ( Z ) = Z β ,     for   some   β 0 ; H 1 : ϕ ( Z )   is   increasing   in   Z ,   but   not   H 0 .
Given a sample { ( X i , Δ i , Z i ) } i = 1 n , we have MPLEs β ^ and ϕ ^ of partial likelihood (4) and (6) under the Cox PH model (2) and isotonic PH model (5), respectively. Under H 0 , it is natural to consider a restricted MPLE β ^ + = max { β ^ , 0 } . Plugging in the MPLEs into their corresponding partial likelihoods, we propose a partial-likelihood-based test statistic
T n = I s o ( ϕ ^ ) C o x ( β ^ + ) .
Since the linear relationship Z β with β 0 under H 0 is a special case of a monotone relationship ϕ ( Z ) under H 0 H 1 , it is expected that I s o ( ϕ ^ ) C o x ( β ^ + ) and T n 0 . Therefore, large values of T n suggest rejecting H 0 . On the other hand, if ϕ in (8) is decreasing in Z, the restricted MPLE β ^ + can be replaced by a restricted MPLE β ^ = min { 0 , β ^ } and ϕ ^ under ϕ 1 ϕ n . Then, the test statistic is obtained by I s o ( ϕ ^ ) C o x ( β ^ ) and the log-linearity is rejected when T n is too small.
We propose a bootstrap method to determine a critical value for T n to reject H 0 . Inspired by Xu et al. [8], we consider a bootstrapping approach conditional on covariates and censoring times under the null hypothesis H 0 . To generate survival time in the bootstrap samples, we apply the traditional inverse of the distribution function method to generate the bootstrap survival time. Note that a survival function defined by S ( t | Z i ) = 1 F ( t | Z i ) of the Cox PH model is S ( t | Z i ) = exp { Λ 0 ( t ) exp ( Z i β ) } , where Λ 0 ( t ) = 0 t λ 0 ( u ) d u is the cumulative baseline hazard function. Therefore, provided by existences, an inverse of S ( t | Z ) is given by S 1 ( u | Z i ) = Λ 0 1 { log ( u ) exp ( Z i β ) } for u [ 0 , 1 ] , where Λ 0 1 ( t ) is the inverse of Λ 0 ( t ) .
Since the estimators of Λ 0 and β are required when estimating S 1 ( u | Z i ) , we first consider the Breslow-type estimator [10]
Λ ^ 0 ( t ) = i = 1 n 0 t d N i ( u ) j = 1 n Y j ( u ) exp ( Z j β ^ + ) ,
and the corresponding inverse defined by Λ ^ 0 1 ( v ) = inf { t : Λ ^ 0 ( t ) v } , for 0 v < . Note that Λ ^ 0 1 is a step function such that the bootstrapped survival times generated from it may contain ties, potentially reducing the efficiency and stability of the proposed test. To address this issue, we consider a continuous and piecewise linear version of Λ ^ 0 , denoted by Λ ˜ 0 ( t ) , to smooth Λ ^ 0 and avoid ties of the bootstrapped survival times and enhance the performance of the test. Specifically, denote t 0 = 0 , and 0 < t 1 < < t m < are the locations of jump points of Λ ^ 0 such that lim δ 0 + Λ ^ 0 ( t i δ ) < Λ ^ 0 ( t i ) for 1 i m . Then, we define Λ ˜ 0 ( t ) = Λ ^ 0 ( t i ) Λ ^ 0 ( t i 1 ) t i t i 1 ( t t i 1 ) + Λ ^ 0 ( t i 1 ) for t [ t i 1 , t i ) , i = 1 , , m , and Λ ˜ 0 ( t ) = Λ ^ 0 ( t m ) for t [ t m , ) . The corresponding inverse is defined by
Λ ˜ 0 1 ( w ) = ( t i t i 1 ) ( w Λ ^ 0 ( t i 1 ) Λ ^ 0 ( t i ) Λ ^ 0 ( t i 1 ) + t i 1 , w ( Λ ^ 0 ( t i 1 ) , Λ ^ 0 ( t i ) ] , i = 1 , , m ; t m , w ( Λ ^ 0 ( t m ) , ) .
Therefore, in the bth bootstrapped sample, we generate the survival times
T i b = Λ ˜ 0 1 { log ( U i b ) exp ( Z i β ^ + ) } ,
for the i = 1 , , n , where U i b are random variables independently and identically generated from a univariate uniform distribution with support ( 0 , 1 ) , denoted by U ( 0 , 1 ) .
Based on the censoring status Δ i , we generate the bootstrapped censoring time for the ith subject in the bth bootstrapped sample, denoted by C i b . If the survival time is censored ( Δ i = 0 ), obtain the bootstrapped censoring time as the original censoring time with C i b = C i . If the survival time is observed ( Δ i = 1 ), we again apply the inverse distribution method from the estimated censoring distribution G. We approximate G by the traditional Kaplan–Meier estimator, denoted by G ^ , with modified data { ( X i , 1 Δ i ) } i = 1 n . Similar to bootstrapped survival times, to generate bootstrapped censoring times, we smooth and interpolate G ^ linearly and obtain G ˜ . Then, we obtain the corresponding inverse
G ˜ 1 ( u ) = ( c i c i 1 ) ( u G ^ ( t i 1 ) G ^ ( t i ) G ^ ( t i 1 ) + c i 1 , u ( G ^ ( c i 1 ) , G ^ ( c i ) ] , i = 1 , , m ; c m , u ( G ^ ( c m ) , 1 ) ,
where c 0 = 0 , 0 < c 1 < < c m < are the locations of jump points of G ^ such that lim δ 0 + G ^ ( c i δ ) < G ^ ( c i ) for 1 i m . Hence, we obtain
C i b = G ˜ 1 ( V i b ) I ( Δ i = 1 ) + C i I ( Δ i = 0 ) ,
where V i b is independently and identically generated from U ( 0 , 1 ) and is independent from U i b .
In summary, given data { ( X i , Δ i , Z i ) } i = 1 n , we independently generate B bootstrapped survival and censoring times, T i b and C i b , from (10) and (11), respectively, and obtain X i b = min { T i b , C i b } and Δ i b = I ( T i b C i b ) for b = 1 , , B . Using each bootstrapped sample, { ( X i b , Δ i b , Z i ) } i = 1 n , we calculate the bootstrapped test statistic T n b . The critical value, denoted by c α , is approximated by the αth upper quantile of { T n b } b = 1 B . We reject the null hypothesis when T n > c α .

4. Simulation

4.1. Size and Power Study

We set a significant level of α = 0.05 for Section 4 and Section 5. To evaluate the size and power of the proposed GOF test, we consider seven different functions ϕ ( Z ) over Z ( 0.1 , 2 ) in the isotonic PH model in (5) with the constant baseline hazard λ 0 ( t ) = 1 . Three effect functions are linear— ϕ ( Z ) = 0 , Z , and 5 Z , satisfying H 0 —and the remaining four correspond to nonlinear increasing functions: ϕ ( Z ) = Z 2 , exp ( Z ) , log ( Z ) , and 6 Z , satisfying H 1 . The covariates Z i were independently generated from scaled and shifted beta distributions over the support ( 0.1 , 2 ) with densities proportional to { ( u 0.1 ) / 1.9 } a { 1 ( u 0.1 ) / 1.9 } b for u ( 0.1 , 2 ) , with a , b > 0 . We consider three covariate distribution scenarios, denoted by C c , C u , and C b , corresponding to parameter pairs ( a , b ) = ( 2 , 2 ) , ( 1 , 1 ) , and ( 0.5 , 0.5 ) , respectively. In scenario C c , covariate values are concentrated near the center of the support. In contrast, scenario C b emphasizes values near the boundaries, while scenario C u results in a uniform distribution of covariates across the support.
For each scenario, 500 Monte Carlo samples were generated to approximate the probabilities of rejecting H 0 . We consider n = { 50 , 100 , 200 , 500 , 1000 } to assess the effect of sample size on test performance. Censoring times are drawn from a uniform distribution U ( 0 , θ ) with θ > 0 such that the censoring rate is about 30 % . For each sample, critical values for the proposed GOF test are computed using B = 500 bootstrap replications conditional on covariates and censoring times. We compare the proposed GOF test with the commonly applied residual-based GOF test proposed by Lin et al. [6], denoted by R n , which does not rely on the isotonic PH assumption.
Under H 0 , according to the results in Table 1, all the type-I error probabilities are below 0.075 and do not significantly exceed the nominal level α = 0.05 , with a margin of error of 0.025 z 0.995 × 0.05 ( 1 0.05 ) / 500 for 500 Monte Carlo samples at a confidence level of 99 % , where z 0.995 is the 99.5th quantile of the standard normal distribution. Regarding the proposed test T n , the case with ϕ ( Z ) = Z generally exhibits slightly larger type I error probabilities compared to ϕ ( Z ) = 0 and 5 Z . Conversely, R n does not exhibit systematic patterns. Furthermore, neither T n nor R n demonstrates notable differences across the covariate distributions considered.
Under H 1 , both T n and R n exhibit powers approaching 1 as sample size n increases, suggesting that both tests are capable of detecting deviations from log-linearity in the hazard function with high probability for large sample sizes. Among the considered covariate distributions, C b generally leads to the highest power, followed by C u and then C c , since there is greater curvature near the boundaries, which aligns well with the boundary-focused distribution C b . Notably, T n shows greater power for small sample sizes n = 50 for ϕ ( Z ) = Z 2 , exp ( Z ) , and log ( Z ) . When the sample size grows, T n continues to outperform under C c when the covariates focus more around the center of the support, where ϕ is not as curved around boundaries. Conversely, R n demonstrates higher power under C b , while, under C u , the performances of T n and R n are generally comparable, with neither test consistently dominating. Lastly, for ϕ ( Z ) = 6 Z , although the power of T n tends to be lower than R n , it remains competitive across most of the covariate distributions and sample sizes.

4.2. Evaluation of Robustness Across Baseline Hazards

We evaluate the robustness of the tests T n and R n under different baseline hazard functions, using the effect functions ϕ and uniform covariate distribution C u as in Section 4.1. Specifically, we consider baseline hazards generated from Gompertz distributions, denoted by G ( η , b ) , with shape parameter η and scale parameter b. Two Gompertz models are used: G ( 1 , 2 ) and G ( 2 , 0.5 ) . In contrast to the constant baseline hazard from the exponential distribution with mean 1, both G ( 1 , 2 ) and G ( 2 , 0.5 ) have increasing hazard functions, while G ( 2 , 0.5 ) increases faster. The distinct shapes of these hazard functions are illustrated in Figure 1.
Under H 0 , Table 2 shows that both T n and R n have similar type I error probabilities lower than 0.075 , maintaining well-controlled type-I error rates, as shown in the size study in Section 4.1. Under H 1 , the test T n demonstrates robustness between different baseline hazard functions, with most power differences between G ( 1 , 2 ) and G ( 2 , 0.5 ) remaining below 0.05 . In contrast, R n is more sensitive to the changes in the baseline hazards, with power differences up to 0.168 and 0.166 when ϕ ( Z ) = 6 Z with n = 500 and 1000, respectively.

5. Illustrations with Real Data

5.1. German Breast Cancer Study

Breast cancer is the most common cancer among women worldwide, and although it predominantly affects women, men can also develop breast cancer. It can profoundly impact a person’s life, but with advances in medical research and treatment, the prognosis for many patients has improved significantly. Early detection, comprehensive treatment plans, and ongoing support can help individuals and their families manage the challenges posed by breast cancer and improve their overall quality of life.
Here, we analyze the gbsg dataset in the R package survival, which is also known as the German Breast Cancer Study Group (GBSG) dataset. It comes from a clinical trial conducted by the German Breast Cancer Study Group. The dataset contains information on 686 patients with primary node-positive breast cancer who were treated at 17 centers in Germany between 1984 and 1989. In the dataset, 387 of 686 patients were censored, so the censoring rate is 56.4 % . Except for the survival time and status of whether a patient is censored, the dataset includes several variables, such as age, tumor size, and the number of positive lymph nodes.
Here, we wish to test the log-linearity assumption for an important prognostic factor in breast cancer: the number of positive lymph nodes. As suggested by Fitzgibbons et al. [11], a higher number of positive lymph nodes is associated with an increased risk of breast cancer recurrence and a higher risk of death from the disease. We assume the monotonicity constraints to be satisfied and conduct the GOF test with hypotheses
H 0 : λ ( t | Z ) = λ 0 ( t ) exp ( Z β )   for   some     β 0 , H 1 : λ ( t | Z ) = λ 0 ( t ) exp { ϕ ( Z ) }   for   some   increasing   function     ϕ ,   but   not   H 0 ,
where Z is the number of positive lymph nodes. For the estimation of ϕ , we choose Z K = 2 such that ϕ ^ ( Z K ) = 0 . With the bootstrap sample size of 500, we obtain the test statistic T n = 18.215 and bootstrap critical value c α = 9.288 . We reject the null hypothesis that the log-linearity of the hazard associated with the number of positive lymph nodes is satisfied.
In Figure 2, we present shifted log-hazard effect ( Z Z K ) β ^ + and ϕ ^ ( Z ) , so ( Z Z K ) β ^ + = ϕ ^ ( Z ) = 0 at Z = Z K . This normalization mitigates identifiability issues and facilitates clearer graphical comparisons. From Figure 2, ϕ ( Z ) from the isotonic PH model reveals a faster increase in hazard for a smaller number of positive nodes and deviates from the log-linear effect Z β ^ + with constant slope β ^ + . In addition, the shape of estimate ϕ ^ ( Z ) motivates a square-root transformed covariate Z in the Cox PH model with hazard λ ( t | Z ) = λ 0 ( t ) exp ( Z β * ) for some β * 0 . For comparisons, we added ( Z Z K ) β ˜ + , where β ˜ + is the corresponding restricted MPLE of β * , in Figure 2. Compared with ( Z Z K ) β ^ + , the square-root transformed ( Z Z K ) β ˜ + captures the faster increase in hazard for a smaller number of positive nodes but a slower increase for a larger number of positive nodes. To further evaluate the square-root transformation, we apply the proposed GOF test with the following hypotheses:
H 0 * : λ ( t | Z ) = λ 0 ( t ) exp ( Z β * )   for   some   β * 0 , H 1 * : λ ( t | Z ) = λ 0 ( t ) exp { ϕ * ( Z ) }   for   some   increasing   function   ϕ * ,   but   not   H 0 * .
With test statistic T n = 8.413 and an estimated critical value c α = 9.703 from B = 500 bootstrapped samples, the evidence is not strong enough to reject H 0 * and support the appropriateness of Z in the Cox PH model. This finding is consistent with the approach of Royston and Altman [12], which performed a square-root transformation on the number of nodes when applying the Cox PH model.

5.2. NCCTG Lung Cancer Data

While progress has been made in recent years, particularly in the areas of early detection, targeted therapies, and immunotherapies, lung cancer remains a challenging problem. Lung cancer holds the top position in cancer-related deaths across the globe, resulting in a higher number of fatalities than the sum of breast, prostate, and colorectal cancer deaths. Compared to early-stage lung cancer, advanced lung cancer, which refers to lung cancer that has progressed to a stage where it has spread beyond the lungs to other parts of the body or has become locally extensive, affecting nearby tissues and structures, typically has a poorer prognosis.
Here, we analyze the cancer dataset in the R package survival, which is collected from a study conducted by the North Central Cancer Treatment Group (NCCTG) on patients with advanced lung cancer. As mentioned by Loprinzi et al. [9], this study aimed to assess if the prognostic information gathered from a patient-completed questionnaire could offer independent insights beyond those already obtained by the patient’s physician through descriptive data. The Karnofsky Performance Score (KPS), rated by patients, assesses a patient’s ability to perform routine daily tasks and activities. The KPS was developed by Karnofsky [13] as a method for evaluating a patient’s functional status, particularly in assessing the response to chemotherapeutic agents in cancer treatment. The score ranges from 0 to 100, with higher scores indicating better functional ability. We consider the relationship between the hazard of failure and the KPS to be decreasing. Therefore, we can apply the GOF test for the Cox PH model to check if the log-linearity assumption is satisfied for the KPS. The hypotheses are as follows:
H 0 : λ ( t | Z ) = λ 0 ( t ) exp ( Z β )   for   some   β 0 , H 1 : λ ( t | Z ) = λ 0 ( t ) exp { ϕ ( Z ) }   for   some   increasing   function   ϕ ( Z ) ,   but   not   H 0 ,
where Z represents the KPS rated by the patient. In the dataset, 63 of the 225 patients were censored after removing the records with missing values. Here, we choose Z K = 70 such that ϕ ^ ( Z K ) = 0 . With the bootstrap sample size of 500, we obtain the test statistic T n = 1.308 and bootstrap critical value c α = 4.671 . We fail to reject the null hypothesis that the log-linearity assumption between the hazard of death and the Karnofsky Performance Score is satisfied. The shifted log-linear hazard effect ( Z Z K ) β ^ and log-monotonic hazard effect ϕ ^ ( Z ) are presented in Figure 3. These two log-hazard effects are close overall, also suggesting that the Cox PH model is a reasonable choice for studying the hazard through the patients’ self-rated KPS.

6. Discussion

In this work, we propose a GOF test for evaluating the log-linearity effect of a univariate covariate in the traditional Cox PH model framed within the isotonic PH model. The bootstrapped critical values used in the test demonstrate well-controlled type I error rates and strong power for detecting deviations from log-linearity. In addition, when the proposed GOF test rejects the log-linearity, from the estimated ϕ ^ ( Z ) plot, one can propose a transformation g ( Z ) and perform the GOF test for
H 0 * : λ ( t | Z ) = λ 0 ( t ) exp ( g ( Z ) β * )   for   some   β * 0 , H 1 * : λ ( t | Z ) = λ 0 ( t ) exp [ ϕ * { g ( Z ) } ]   for   some   increasing   function   ϕ * ,   but   not   H 0 * ,
to check if the transformed g ( Z ) is appropriate or further monotonic transformation is needed.
As shown in Section 4.1, the proposed test appears to be conservative, indicating potential for improvement. In addition to the robustness assessment in Section 4.2, we further provide more numerical results for a higher censoring rate of 50 % and discrete censoring distributions in the Supplementary Material. As expected, a higher censoring rate leads to more conservative tests; however, the tests remain valid since the power approaches 1 as the sample size increases. On the other hand, we observe that a uniform discrete censoring distribution that mildly discretizes the continuous uniform censoring distribution has a minor impact on the rejection rates. In addition, exploring the asymptotic properties and theoretical justifications is crucial for improving our understanding of the test statistic’s distribution and refining the choice of critical values. Investigating how the shape of the monotonic function affects power could also yield valuable insights guided by these theoretical advancements.
Despite these challenges, extending the proposed partial-likelihood-based GOF test to handle multiple covariates or a partial linear PH model with monotonic effects [7] is a natural and promising direction. However, such extensions require careful consideration and warrant further investigation. Finally, resolving the open problem of understanding the distribution of the log partial likelihood in (7), even for univariate covariates, remains a challenging and necessary task.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/math13142264/s1.

Author Contributions

Methodology, H.C. and C.-F.T.; Software, H.C.; Writing—original draft, H.C. and C.-F.T.; Writing—review & editing, C.-F.T.; Visualization, H.C.; Supervision, C.-F.T.; Funding acquisition, C.-F.T. All authors have read and agreed to the published version of the manuscript.

Funding

This work was partially supported by the National Science Foundation [DMS 2311292].

Data Availability Statement

The original contributions presented in this study are included in the article/Supplementary Material. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CMFCyclophosphamide, methotrexate, and fluorouracil
GBSG   German Breast Cancer Study Group
GOFGoodness-of-fit
KPSKarnofsky Performance Score
MPLEMaximum partial likelihood estimator
NCCTGNorth Central Cancer Treatment Group
PHProportional hazards

References

  1. Cox, D.R. Regression models and life-tables. J. R. Stat. Soc. Ser. (Methodol.) 1972, 34, 187–202. [Google Scholar] [CrossRef]
  2. Cox, D.R. Partial likelihood. Biometrika 1975, 62, 269–276. [Google Scholar] [CrossRef]
  3. Grambsch, P.M.; Therneau, T.M. Proportional hazards tests and diagnostics based on weighted residuals. Biometrika 1994, 81, 515–526. [Google Scholar] [CrossRef]
  4. Therneau, T.M.; Grambsch, P.M. The Cox Model. In Modeling Survival Data: Extending the Cox Model; Springer: New York, NY, USA, 2000. [Google Scholar]
  5. Therneau, T.M.; Grambsch, P.M.; Fleming, T.R. Martingale-based residuals for survival models. Biometrika 1990, 77, 147–160. [Google Scholar] [CrossRef]
  6. Lin, D.Y.; Wei, L.J.; Ying, Z. Checking the Cox model with cumulative sums of martingale-based residuals. Biometrika 1993, 80, 557–572. [Google Scholar] [CrossRef]
  7. Chung, Y.; Ivanova, A.; Hudgens, M.G.; Fine, J.P. Partial likelihood estimation of isotonic proportional hazards models. Biometrika 2018, 105, 133–148. [Google Scholar] [CrossRef] [PubMed]
  8. Xu, G.; Sen, B.; Ying, Z. Bootstrapping a change-point Cox model for survival data. Electron. J. Stat. 2014, 8, 1345. [Google Scholar] [CrossRef] [PubMed]
  9. Loprinzi, C.L.; Laurie, J.A.; Wieand, H.S.; Krook, J.E.; Novotny, P.J.; Kugler, J.W.; Bartel, J.; Law, M.; Bateman, M.; Klatt, N.E. Prospective evaluation of prognostic variables from patient-completed questionnaires. North Central Cancer Treatment Group. J. Clin. Oncol. 1994, 12, 601–607. [Google Scholar] [CrossRef] [PubMed]
  10. Breslow, N.E. Contribution to discussion of paper by DR Cox. J. R. Stat. Soc. Ser. B 1972, 34, 216–217. [Google Scholar]
  11. Fitzgibbons, P.L.; Page, D.L.; Weaver, D.; Thor, A.D.; Allred, D.C.; Clark, G.M.; Ruby, S.G.; O’Malley, F.; Simpson, J.F.; Connolly, J.L.; et al. Prognostic factors in breast cancer: College of American Pathologists consensus statement 1999. Arch. Pathol. Lab. Med. 2000, 124, 966–978. [Google Scholar] [CrossRef] [PubMed]
  12. Royston, P.; Altman, D.G. External validation of a Cox prognostic model: Principles and methods. BMC Med. Res. Methodol. 2013, 13, 1–15. [Google Scholar] [CrossRef] [PubMed]
  13. Karnofsky, D.A. The clinical evaluation of chemotherapeutic agents in cancer. In Evaluation of Chemotherapeutic Agents; Columbia University Press: New York, NY, USA, 1949; pp. 191–205. [Google Scholar]
Figure 1. Hazard functions for the exponential distribution with mean 1 and the Gompertz distributions G ( 1 , 2 ) and G ( 2 , 0.5 ) .
Figure 1. Hazard functions for the exponential distribution with mean 1 and the Gompertz distributions G ( 1 , 2 ) and G ( 2 , 0.5 ) .
Mathematics 13 02264 g001
Figure 2. Shifted log-hazard effect estimates for the breast cancer dataset. The plot includes ( Z Z K ) β ^ + from a Cox PH model, ϕ ^ ( Z ) from the isotonic PH model, and ( Z Z K ) β ˜ + from a Cox PH model with the square-root transformed covariate Z .
Figure 2. Shifted log-hazard effect estimates for the breast cancer dataset. The plot includes ( Z Z K ) β ^ + from a Cox PH model, ϕ ^ ( Z ) from the isotonic PH model, and ( Z Z K ) β ˜ + from a Cox PH model with the square-root transformed covariate Z .
Mathematics 13 02264 g002
Figure 3. Shifted log-hazard effect estimates for the NCCTG lung cancer data. The plot includes ( Z Z K ) β ^ + from a Cox PH model and ϕ ^ ( Z ) from the isotonic PH model, and ( Z Z K ) β ˜ + from a Cox PH model with the square-root transformed covariate Z .
Figure 3. Shifted log-hazard effect estimates for the NCCTG lung cancer data. The plot includes ( Z Z K ) β ^ + from a Cox PH model and ϕ ^ ( Z ) from the isotonic PH model, and ( Z Z K ) β ˜ + from a Cox PH model with the square-root transformed covariate Z .
Mathematics 13 02264 g003
Table 1. Rejection rates for the GOF tests T n and R n with covariate distributions C c , C u , and C b .
Table 1. Rejection rates for the GOF tests T n and R n with covariate distributions C c , C u , and C b .
ϕ ( Z ) Under H 0 ϕ ( Z ) Under H 1
n 0Z 5 Z Z 2 exp ( Z ) log ( Z ) 6 Z
50 C c T n 0.0180.0560.0440.0920.1400.0740.056
R n 0.0440.0400.0380.0440.0800.0620.070
C u T n 0.0260.0600.0220.1300.2160.0980.058
R n 0.0540.0620.0460.1020.1340.0720.062
C b T n 0.0260.0460.0280.1480.2540.1900.066
R n 0.0420.0320.0380.1080.1660.1440.112
100 C c T n 0.0280.0520.0260.2220.2760.1020.070
R n 0.0420.0600.0400.1240.1860.0900.088
C u T n 0.0300.0580.0280.2220.4280.2020.100
R n 0.0400.0500.0520.2380.3720.1500.138
C b T n 0.0380.0600.0220.2780.5340.3640.148
R n 0.0600.0400.0320.3320.5860.3040.138
200 C c T n 0.0240.0560.0180.4060.4700.1520.114
R n 0.0420.0440.0540.2320.4080.1380.136
C u T n 0.0220.0500.0220.4060.7820.3460.204
R n 0.0520.0400.0380.5120.7920.3420.266
C b T n 0.0380.0400.0280.6020.9100.6140.342
R n 0.0400.0440.0380.7480.9380.5960.426
500 C c T n 0.0340.0600.0380.8700.8860.3160.282
R n 0.0380.0400.0540.5700.8740.2860.314
C u T n 0.0460.0680.0260.8700.9980.7300.508
R n 0.0480.0340.0260.9440.9980.6840.630
C b T n 0.0380.0680.0300.9481.0000.9500.812
R n 0.0720.0680.0640.9801.0000.9640.870
1000 C c T n 0.0300.0660.0460.9940.9980.6240.500
R n 0.0620.0640.0420.9040.9980.5540.554
C u T n 0.0180.0520.0320.9941.0000.9620.856
R n 0.0540.0620.0461.0001.0000.9740.928
C b T n 0.0260.0500.0221.0001.0001.0000.986
R n 0.0420.0460.0441.0001.0001.0000.992
Table 2. Rejection rates for the GOF tests T n and R n under baseline hazards G ( 1 , 2 ) and G ( 2 , 0.5 ) . Power differences of at least 0.05 between the two settings are indicated with an asterisk (*), and differences exceeding 0.12 are further marked with a dagger ().
Table 2. Rejection rates for the GOF tests T n and R n under baseline hazards G ( 1 , 2 ) and G ( 2 , 0.5 ) . Power differences of at least 0.05 between the two settings are indicated with an asterisk (*), and differences exceeding 0.12 are further marked with a dagger ().
ϕ ( Z ) Under H 0 ϕ ( Z ) Under H 1
n 0Z 5 Z Z 2 exp ( Z ) log ( Z ) 6 Z
50 T n G ( 1 , 2 ) 0.0280.0580.0200.1460.2140.1180.062
G ( 2 , 0.5 ) 0.0300.0560.0200.1500.2300.1320.058
R n G ( 1 , 2 ) 0.0300.0340.0340.1140.1420.0780.058
G ( 2 , 0.5 ) 0.0320.0300.0400.0900.1020.0600.058
100 T n G ( 1 , 2 ) 0.0260.0680.0280.2340.4400.2400.094
G ( 2 , 0.5 ) 0.0260.0580.0200.2400.4300.2620.100
R n G ( 1 , 2 ) 0.0420.0540.0520.2300.362 *0.1480.132
G ( 2 , 0.5 ) 0.0400.0400.0520.2060.274 *0.1280.110
200 T n G ( 1 , 2 ) 0.0200.0540.0220.4200.7820.3800.206
G ( 2 , 0.5 ) 0.0200.0600.0240.4360.7760.4140.198
R n G ( 1 , 2 ) 0.0460.0560.0380.492 *0.800 0.3520.272 *
G ( 2 , 0.5 ) 0.0520.0380.0400.384 *0.672 0.3120.222 *
500 T n G ( 1 , 2 ) 0.0440.0740.0320.8860.9980.7460.508
G ( 2 , 0.5 ) 0.0440.0680.0340.8921.0000.7940.508
R n G ( 1 , 2 ) 0.0500.0360.0240.948 *0.9960.7100.662
G ( 2 , 0.5 ) 0.0480.0540.0320.880 *0.9960.6760.494
1000 T n G ( 1 , 2 ) 0.0240.0520.0300.9941.0000.9680.872
G ( 2 , 0.5 ) 0.0240.0460.0320.9921.0000.9740.868
R n G ( 1 , 2 ) 0.0480.0600.0521.0001.0000.9800.932
G ( 2 , 0.5 ) 0.0540.0420.0400.9941.0000.9740.766
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chen, H.; Tang, C.-F. A Goodness-of-Fit Test for Log-Linearity in Cox Proportional Hazards Model Under Monotonic Covariate Effects. Mathematics 2025, 13, 2264. https://doi.org/10.3390/math13142264

AMA Style

Chen H, Tang C-F. A Goodness-of-Fit Test for Log-Linearity in Cox Proportional Hazards Model Under Monotonic Covariate Effects. Mathematics. 2025; 13(14):2264. https://doi.org/10.3390/math13142264

Chicago/Turabian Style

Chen, Huan, and Chuan-Fa Tang. 2025. "A Goodness-of-Fit Test for Log-Linearity in Cox Proportional Hazards Model Under Monotonic Covariate Effects" Mathematics 13, no. 14: 2264. https://doi.org/10.3390/math13142264

APA Style

Chen, H., & Tang, C.-F. (2025). A Goodness-of-Fit Test for Log-Linearity in Cox Proportional Hazards Model Under Monotonic Covariate Effects. Mathematics, 13(14), 2264. https://doi.org/10.3390/math13142264

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop