EventWinRatios

This package provides several confidence interval and testing procedures using event-specific win ratios for semi-competing risks data with non-terminal and terminal events, as developed in Yang et al. (2021). The event-specific win ratios were introduced in Yang and Troendle (2021).

The main function wr.test provides various confidence interval and testing procedures with event-specific win ratios:

Note that the wr.test function uses transformations that yield better control of the type one error rates for moderately sized data sets.

Installation

install.packages("EventWinRatios")

Implementation

The following arguments must be inputted into the wr.test function.

The linear combination of the event-specific win ratios can be supplied using the lin argument. The significance level for confidence intervals can be controlled by the alpha argument. If they are not supplied by users, the function uses lin = c(0.5, 0.5) and alpha = 0.5 by default.

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. The weights can be either a data-driven weights or pre-determined weights. The pre-determined weights can be supplied with the lin argument.

Example

The data set SimuData in the package is used as an example.

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)

Reference

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.