propWINS {hce}R 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

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)

[Package hce version 0.6.0 Index]