wr.ss {WRestimates}R Documentation

Approximate Sample Size of a Win Ratio

Description

Calculates the approximate required sample size of a win ratio.

N ~~ (\sigma^2 * (Z[1-\alpha] + Z[1-\beta])^2)/(ln^2(WR[true]))

Usage

wr.ss(alpha = 0.025, beta = 0.1, WR.true = 1, k, p.tie, sigma.sqr)

Arguments

alpha

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

beta

Type II error rate; Default: \beta = 0.1.

WR.true

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

k

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

p.tie

The proportion of ties.

sigma.sqr

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

Value

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

N

Sample size.

alpha

Level of significance (Type I error rate).

beta

Type II error rate.

WR.true

True or assumed win ratio.

k

The proportion of subjects allocated to one group.

p.tie

The proportion of ties.

sigma.sqr

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

Author(s)

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

## 1:1 allocation, one-sided alpha = 2.5%, power = 90% (beta = 10%),
## a small proportion of ties p.tie = 0.1, and 50% more wins on treatment
## than control

### Calculate Sample Size
wr.ss(WR.true = 1.5, k = 0.5, p.tie = 0.1)

[Package WRestimates version 0.1.0 Index]