Learn R Programming

WRestimates (version 0.1.0)

wr.var: Approximate Variance of the Natural Log (\(ln\)) of the Win Ratio.

Description

Calculating the approximate variance of the natural log (\(ln\)) a win ratio. $$Var(ln(WR)) ~~ \sigma^2/N$$ Where; $$\sigma^2 = (4 * (1 + p[tie]))/(3 * k * (1 - k) * (1 - p[tie])$$

Usage

wr.var(N, sigma.sqr, k, p.tie)

Value

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

var.ln.WR

Approximate variance of the natural log (\(ln\)) a 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

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