wr.ci {WRestimates} | R Documentation |
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)
Arguments
WR |
Win ratio; Default: |
Z |
Z-score from normal distribution; Default: |
var.ln.WR |
Variance of the natural log ( |
N |
Sample size. |
sigma.sqr |
Population variance of the natural log ( |
k |
The proportion of subjects allocated to one group i.e. the proportion of patients allocated to treatment. |
p.tie |
The proportion of ties. |
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 ( |
N |
Sample size. |
sigma.sqr |
Population variance of the natural log ( |
k |
The proportion of subjects allocated to one group. |
p.tie |
The proportion of ties. |
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
Examples
## 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)