Learn R Programming

WRestimates (version 0.1.0)

wr.power: Power of a Win Ratio

Description

Calculate the power of a win ratio. $$Power = 1 - \Phi(Z[\alpha] - ln(WR[true])(\sqrt{N}/\sigma))$$

Usage

wr.power(N, alpha = 0.025, WR.true = 1, sigma.sqr, k, p.tie)

Value

wr.power returns an object of class "list" containing the following components:

power

Power of the win ratio.

N

Sample size.

alpha

Level of significance.

WR.true

True or assumed win ratio.

sigma.sqr

Population variance of the natural log (\(ln\)) of the win ratio.

k

The proportion of subjects allocated to one group.

p.tie

The proportion of ties.

Arguments

N

Sample size.

alpha

Level of significance (Type I error rate); Default: \(\alpha\) = 0.025.

WR.true

True or assumed win ratio; Default: WR.true = 1 where H0 is assumed true.

sigma.sqr

Population variance of the natural log (\(ln\)) of the win ratio.

k

The proportion of subjects allocated to one group i.e. the proportion of patients allocated to treatment.

p.tie

The proportion of ties.

Author

Autumn O'Donnell autumn.research@gmail.com

References

Yu, R. X. and Ganju, J. (2022). Sample size formula for a win ratio endpoint. Statistics in medicine, 41(6), 950-963. doi: 10.1002/sim.9297.

See Also

wr.sigma.sqr

Examples

Run this code
## N = 100 patients, 1:1 allocation, one-sided alpha = 2.5%, small
## proportion of ties p.tie = 0.1, and 50% more wins on treatment
## than control.

### Calculate the Power
wr.power(N = 100, WR.true = 1.5, k = 0.5, p.tie = 0.1)

Run the code above in your browser using DataLab