Title: | Stratified Max-Combo Test |
---|---|
Description: | Non-proportional hazard (NPH) is commonly observed in immuno-oncology studies, where the survival curves of the treatment and control groups show delayed separation. To properly account for NPH, several statistical methods have been developed. One such method is Max-Combo test, which is a straightforward and flexible hypothesis testing method that can simultaneously test for constant, early, middle, and late treatment effects. However, the majority of the Max-Combo test performed in clinical studies are unstratified, ignoring the important prognostic stratification factors. To fill this gap, we have developed an R package for stratified Max-Combo testing that accounts for stratified baseline factors. Our package explores various methods for calculating combined test statistics, estimating joint distributions, and determining the p-values. |
Authors: | Yuwen Liu [aut, cre], Yumeng Wang [aut] |
Maintainer: | Yuwen Liu <[email protected]> |
License: | GPL-2 |
Version: | 0.0.1 |
Built: | 2025-03-08 02:44:28 UTC |
Source: | https://github.com/cran/strata.MaxCombo |
Simulated survival data for demonstrating the usage of WLRtest and SMCtest.
data(sim_data)
data(sim_data)
The data file consists of four components: event_time, event_status, group and strata. Data contains different event_times, two event_status (0: censored and 1: event), two groups (control and experimental) and two stratum (first and second).
This function performs stratified Max-Combo test.
SMCtest( time, event, group, stratum, alternative = c("two.sided", "less", "greater"), rho = c(0, 1, 1, 0), gamma = c(0, 0, 1, 1) )
SMCtest( time, event, group, stratum, alternative = c("two.sided", "less", "greater"), rho = c(0, 1, 1, 0), gamma = c(0, 0, 1, 1) )
time |
a vector of event or censored times. |
event |
a vector with entries 0 or 1, indicating event occurrence (1) or time being censored (0). |
group |
a vector indicating treatment groups. |
stratum |
a vector of stratification factor. |
alternative |
choose from |
rho |
a vector indicating different values of rho in Fleming-Harrington weight. |
gamma |
a vector indicating different values of gamma in Fleming-Harrington weight. |
A list with components:
z.list |
a vector of z values calculated from all startified weighted log-rank tests under stratification method 1. |
z.max |
the z value that is the furthest away from 0 under stratification method 1. |
cov |
the covariance matrix of different startified weighted log-rank tests under stratification method 1. |
pval |
p-value of desired alternative test under stratification method 1. |
z.list2 |
a vector of z values calculated from all startified weighted log-rank tests under stratification method 2. |
z.max2 |
the z value that is the furthest away from 0 under stratification method 2. |
cov2 |
the covariance matrix of different startified weighted log-rank tests under stratification method 2. |
pval2 |
p-value of desired alternative test under stratification method 2. |
z.list3 |
a vector of z values calculated from all startified weighted log-rank tests under stratification method 3. |
z.max3 |
the z value that is the furthest away from 0 under stratification method 3. |
cov3 |
the covariance matrix of different startified weighted log-rank tests under stratification method 3. |
pval3 |
p-value of desired alternative test under stratification method 3. |
Magirr, D. and Jiménez, J. (2023). Stratified modestly-weighted log-rank tests in settings with an anticipated delayed separation of survival curves. Biometrical Journal., 2023;65:2200126 doi:10.1002/bimj.202200126
data(sim_data) ##load survival data time <- sim_data$event_time event <- sim_data$event_status group <- sim_data$group stratum <- sim_data$strata ##perform stratified max-combo test SMCtest(time,event,group,stratum,alternative="two.sided",rho=c(0,1,1,0),gamma=c(0,0,1,1))
data(sim_data) ##load survival data time <- sim_data$event_time event <- sim_data$event_status group <- sim_data$group stratum <- sim_data$strata ##perform stratified max-combo test SMCtest(time,event,group,stratum,alternative="two.sided",rho=c(0,1,1,0),gamma=c(0,0,1,1))
This function performs weighted log-rank test.
WLRtest(time, event, group, rho = 0, gamma = 0)
WLRtest(time, event, group, rho = 0, gamma = 0)
time |
time a vector of event or censored times. |
event |
a vector with entries 0 or 1, indicating event occurrence (1) or time being censored (0). |
group |
a vector indicating treatment groups. |
rho |
a value of rho in Fleming-Harrington weight |
gamma |
a value of gamma in Fleming-Harrington weight |
A list with components:
z |
z value of weighted log-rank test. |
pvalue.two.sided |
p-value for two-sided test. |
pvalue.less |
p-value for one-sided test (less). |
pvalue.greater |
p-value for one-sided test (greater). |
D |
a matrix containing components that can be used in stratified max-combo test. |
Ristl, R., Ballarini, N., Götte, H., Schüler, A., Posch, M. and König, F. (2021). Delayed treatment effects, treatment switching and heterogeneous patient populations: How to design and analyze RCTs in oncology. Pharmaceutical Statistics., 20:129-145 doi:10.1002/pst.2062
data(sim_data) ##load survival data time <- sim_data$event_time event <- sim_data$event_status group <- sim_data$group ##perform weighted log-rank test WLRtest(time,event,group,rho=0,gamma=0)
data(sim_data) ##load survival data time <- sim_data$event_time event <- sim_data$event_status group <- sim_data$group ##perform weighted log-rank test WLRtest(time,event,group,rho=0,gamma=0)