The function wr.test provides several confidence interval and testing procedures with the event-specific win ratios that are obtained on the terminal and non-terminal events. The following procedures are provided:
Tests of the global null - testing the null hypothesis of no treatment effect on either the terminal event or the non-terminal event. A set of three tests are provided: the maximum test, the linear combination test, and the chi-squared test.
Test of proportional hazards - testing the null hypothesis of the proportionality assumptions for the terminal event and the non-terminal event.
Test of equal hazard ratios - testing the null hypothesis of equal hazard ratios for the terminal event and the non-terminal event when they both have proportional hazards.
Confidence intervals of the non-terminal and terminal events respectively
Confidence intervals of linear combinations of the non-terminal and terminal events, with either pre-determined or data-driven weights
The full details for these procedures are available in Yang et al. (2021).
# S3 method for default
wr.test(yh, hcen, yd, dcen, z, lin = c(0.5, 0.5), alpha = 0.05, repnum = 1E6, ...)for S4 method only.
A numeric vector for time to the non-terminal event or censoring
Censoring indicator for the non-terminal event (event = 1, censored = 0)
A numeric vector for time to the terminal event or censoring
Censoring indicator for the terminal event (event = 1, censored = 0)
A numeric vector for the group indicator (treatment = 1, control = 0)
A numeric vector of length 2 for the linear combination of the event-specific win ratios. The components must be non-negative values and added up to one. The first component is for the non-terminal event and the second is for the terminal event. The default is (0.5, 0.5).
The Significance level being used for confidence intervals. The default value is 0.05.
The number of replications for simulating bivariate normal distributions to obtain critical values corresponding to the alpha. The default value is 1E6.
A S3 wr.test class object, which is a list with the following components:
The event specific win ratio for the non-terminal event
The event specific win ratio for the terminal event
The confidence interval for the event specific win ratio for the non-terminal event
The confidence interval for the event specific win ratio for the terminal event
The test statistic for the maximum test
The p-value for the maximum test
The test statistic for the chi-squre test
The p-value for the chi-squre test
The inputted vector for the linear combination of the event-specific win ratios
The test statistic for the linear combination test
The p-value for the linear combination test
The weighted average win ratio with the inputted vector lin
The confidence interval for the weighted average win ratio with the inputted vector lin
The data-driven linear combination
The test statistic for the data-driven Linear combination test
The p-value for the data-driven Linear combination test
The weighted average win ratio with the data-driven combination
The confidence interval for the weighted average win ratio with the data-driven combination
The test statistic for the test of proportional hazards
The p-value for the test of proportional hazards
The test statistic for the test of equal hazard ratios
The p-value for the test of equal hazard ratios
Yang, S., Troendle, J., Pak, D., & Leifer, E. (2022). Event<U+2010>specific win ratios for inference with terminal and non<U+2010>terminal events. Statistics in medicine, 41(7), 1225-1241.
Yang, S., & Troendle, J. (2021). Event-specific win ratios and testing with terminal and non-terminal events. Clinical Trials, 18(2), 180-187.
# NOT RUN {
library(EventWinRatios)
data(SimuData)
# non-terminal events
yh <- SimuData$yh
hcen <- SimuData$hcen
# terminal events
yd <- SimuData$yd
dcen <- SimuData$dcen
# group indicator
z <- SimuData$z
# Win Ratio tests
result <- wr.test(yh, hcen, yd, dcen, z)
print(result)
# }
Run the code above in your browser using DataLab