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])$$
wr.var(N, sigma.sqr, k, p.tie)wr.var returns an object of class "list" containing the following components:
Approximate variance of the natural log (\(ln\)) a win ratio.
Sample size.
Population variance of the natural log (\(ln\)) of the win ratio.
The proportion of subjects allocated to one group.
The proportion of ties.
Sample size.
Population variance of the natural log (\(ln\)) of the win ratio.
The proportion of subjects allocated to one group i.e. the proportion of patients allocated to treatment.
The proportion of ties.
Autumn O'Donnell autumn.research@gmail.com
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.
wr.sigma.sqr