Learn R Programming

WRestimates (version 0.1.0)

wr.ci: Confidence Interval (CI) for Win Ratio

Description

Calculate the confidence interval for a win ratio. $$CI = exp((ln(WR) +/- Z\sqrt{var})$$ Where;

\(ln(WR)\) = Natural log of the true or assumed win ratio.

\(Z\) = Z-score from normal distribution.

\(\sqrt{var}\) = Standard deviation of the natural log of the win ratio.

Usage

wr.ci(WR = 1, Z = 1.96, var.ln.WR, N, sigma.sqr, k, p.tie)

Value

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

ci

The confidence interval of a win ratio.

WR

The win ratio.

Z

Z-score from normal distribution.

var.ln.WR

Variance of the natural log (\(ln\)) of the win ratio.

N

Sample size.

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

WR

Win ratio; Default: WR = 1 for an assumed true win ratio where H0 is assumed true.

Z

Z-score from normal distribution; Default: Z = 1.96 for a 95% CI.

var.ln.WR

Variance of the natural log (\(ln\)) of the win ratio.

N

Sample size.

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; wr.var

Examples

Run this code
## N = 100 patients, 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.

### Calculation 95% CI
wr.ci(N = 100, WR = 1.5, k = 0.5, p.tie = 0.1)

Run the code above in your browser using DataLab