wr.test {EventWinRatios} | R Documentation |
The main function of the package provides various confidence intervals and testing procedures with event-specific win ratios
Description
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).
Usage
## Default S3 method:
wr.test(yh, hcen, yd, dcen, z, lin = c(0.5, 0.5), alpha = 0.05, repnum = 1E6, ...)
Arguments
... |
for S4 method only. |
yh |
A numeric vector for time to the non-terminal event or censoring |
hcen |
Censoring indicator for the non-terminal event (event = 1, censored = 0) |
yd |
A numeric vector for time to the terminal event or censoring |
dcen |
Censoring indicator for the terminal event (event = 1, censored = 0) |
z |
A numeric vector for the group indicator (treatment = 1, control = 0) |
lin |
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). |
alpha |
The Significance level being used for confidence intervals. The default value is 0.05. |
repnum |
The number of replications for simulating bivariate normal distributions to obtain critical values corresponding to the alpha. The default value is 1E6. |
Value
A S3 wr.test
class object, which is a list
with the following components:
wr1 |
The event specific win ratio for the non-terminal event |
wr2 |
The event specific win ratio for the terminal event |
ci1t |
The confidence interval for the event specific win ratio for the non-terminal event |
ci2t |
The confidence interval for the event specific win ratio for the terminal event |
mxot |
The test statistic for the maximum test |
pvalmxt |
The p-value for the maximum test |
chi |
The test statistic for the chi-squre test |
pvachi |
The p-value for the chi-squre test |
lin |
The inputted vector for the linear combination of the event-specific win ratios |
zvalin0 |
The test statistic for the linear combination test |
plin0 |
The p-value for the linear combination test |
wrlin0 |
The weighted average win ratio with the inputted vector |
cilin0 |
The confidence interval for the weighted average win ratio with the inputted vector |
lin_ar |
The data-driven linear combination |
zvalint |
The test statistic for the data-driven Linear combination test |
plintr |
The p-value for the data-driven Linear combination test |
wrlinl |
The weighted average win ratio with the data-driven combination |
cilint |
The confidence interval for the weighted average win ratio with the data-driven combination |
mxph |
The test statistic for the test of proportional hazards |
pvalph |
The p-value for the test of proportional hazards |
zvaephl |
The test statistic for the test of equal hazard ratios |
pvaephl |
The p-value for the test of equal hazard ratios |
Note
Linear combination tests can be used to detect an overall effect, which is measured by using a weighted average of the win ratios of the terminal and non-terminal events, as considered in Yang and Troendle (2021). The weights can be either a data-driven weights or pre-determined weights. The pre-determined weights can be supplied with the lin
argument.
References
Yang, S., Troendle, J., Pak, D., & Leifer, E. (2022). Event‐specific win ratios for inference with terminal and non‐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.
Examples
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)