sizeWR {hce}R Documentation

Sample size calculation for the win ratio test (with WR = 1 null hypothesis)

Description

Sample size calculation for the win ratio test (with WR = 1 null hypothesis)

Usage

sizeWR(WR, power, WO = NULL, Pties = NULL, k = 0.5, alpha = 0.05)

Arguments

WR

a numeric vector of win odds values.

power

the given power. A numeric vector of length 1.

WO

win odds. Should be specified only if Pties is not specified. A numeric vector of length 1.

Pties

probability of ties. A numeric vector of length 1.

k

proportion of active group in the overall sample size. Default is 0.5 (balanced randomization). A numeric vector of length 1.

alpha

the significance level for the 2-sided test. Default is 0.05. A numeric vector of length 1.

Value

a data frame containing the sample size with input values.

References

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.

See Also

sizeWO() for WO sample size calculation.

Examples

sizeWR(WR = 1.35, Pties = 0.125, power = 0.8)
sizeWR(WR = 1.35, WO = 1.3, power = seq(0.5, 0.9, 0.05))

[Package hce version 0.6.0 Index]