Package 'EventWinRatios'

Title: Event-Specific Win Ratios for Terminal and Non-Terminal Events
Description: 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<doi:10.1002/sim.9266>). Compared with conventional methods for survival data, these procedures are designed to utilize more data for improved inference procedures with semi-competing risks data. The event-specific win ratios were introduced in Yang and Troendle (2021<doi:10.1177/1740774520972408>). In this package, the event-specific win ratios and confidence intervals are obtained for each event type, and several testing procedures are developed for the global null of no treatment effect on either terminal or non-terminal events. Furthermore, a test of proportional hazard assumptions, under which the event-specific win ratios converge to the hazard ratios, and a test of equal hazard ratios are provided. For summarizing the treatment effect on all events, confidence intervals for linear combinations of the event-specific win ratios are available using pre-determined or data-driven weights. Asymptotic properties of these inference procedures are discussed in Yang et al (2021<doi:10.1002/sim.9266>). Also, transformations are used to yield better control of the type one error rates for moderately sized data sets.
Authors: Daewoo Pak [aut, cre], Song Yang [aut]
Maintainer: Daewoo Pak <[email protected]>
License: GPL (>= 3)
Version: 1.0.0
Built: 2025-02-14 03:24:35 UTC
Source: https://github.com/cran/EventWinRatios

Help Index


Event-Specific Win Ratios for Terminal and Non-Terminal Events

Description

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). It allows users to utilize more data for improved inference procedures with semi-competing risks data. The event-specific win ratios were introduced in Yang and Troendle (2021), and the detailed definitions and asymptotic results for event-specific win ratios are available in Yang et al. (2021).

Details

Package: EventWinRatios
Type: Package
Version: 1.0.0
Date: 2021-07-09
License: GPL (>= 3)

Author(s)

Daewoo Pak and Song Yang

Maintainer: Daewoo Pak <[email protected]>

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.

See Also

wr.test

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)

Internal functions for the EventWinRatios package

Description

Internal functions for the EventWinRatios package.

Value

No return value, called for side effects


A simulated semi-competing risks data set with non-terminal events and terminal events

Description

SimuData is a simulated data set that is used to show the utility of this package. Under the semi-competing risks data setup, each subject has a non-terminal and a terminal event that may be right censored. Furthermore, the terminal event may censor the non-terminal event.

Usage

data("SimuData")

Format

A data frame with 3500 observations on the following 5 variables.

yh

Time to the non-terminal event of interest or censoring (by an independent censoring variable or a terminal event)

hcen

Censoring indicator for the non-teminal event (event = 1, censored = 0)

yd

Time to the terminal event of interest

dcen

Censoring indicator for the teminal event (event = 1, censored = 0)

z

Group indicator (treatment = 1, control = 0)

See Also

wr.test

Examples

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)

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 lin

cilin0

The confidence interval for the weighted average win ratio with the inputted vector lin

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)