propWINS: Proportion of wins/losses/ties given the win odds and the win...

View source: R/propWINS.R

propWINSR Documentation

Proportion of wins/losses/ties given the win odds and the win ratio

Description

Proportion of wins/losses/ties given the win odds and the win ratio

Usage

propWINS(WO, WR, Overall = 1, alpha = NULL, N = NULL)

Arguments

WO

win odds.

WR

win ratio.

Overall

number of comparisons, the sample size of the active treatment multiplied by the sample size of the placebo. The default is 1, hence gives the proportion.

alpha

significance level for the win ratio confidence interval. The default is NULL hence the confidence interval is not produced.

N

the combined sample size of two treatment groups. The default is NULL. If alpha is specified then either N should be specified or Overall > 1. For given Overall, the pooled sample size is calculated as N = 2*sqrt(Overall).

Details

Calculation formula

Value

a data frame with a number (or proportion if Overall = 1) of wins/losses/ties. If alpha is specified returns also WR confidence interval.

References

  • For the relationship between win odds and win ratio see

    Gasparyan SB et al. "Hierarchical Composite Endpoints in COVID-19: The DARE-19 Trial". Case Studies in Innovative Clinical Trials, Chapter 7 (2023): 95-148. Chapman and Hall/CRC. doi:10.1201/9781003288640-7.

  • The win ratio CI uses the standard error presented in

    Yu RX, Ganju J. (2022) "Sample size formula for a win ratio endpoint." Statistics in Medicine 41.6: 950-63. doi:10.1002/sim.9297.

Examples

# Example 1
propWINS(WR = 2, WO = 1.5)
# Example 2 - Back-calculation 
COVID19HCE <- hce(GROUP = COVID19$GROUP, TRTP = COVID19$TRTP)
res <- calcWINS(COVID19HCE)
WR <- res$WR1$WR
WO <- res$WO$WO
Overall <- res$summary$TOTAL
propWINS(WR = WR, WO = WO, Overall = Overall)
## Verify 
res$summary
# Example 3 - Confidence interval
 propWINS(WR = 1.4, WO = 1.3, alpha = 0.05, Overall = 2500)
 propWINS(WR = 2, WO = 1.5, alpha = 0.01, N = 500)

hce documentation built on Oct. 16, 2024, 9:06 a.m.