*! Version 1.0.3 August 30 2023

help winratiopower

Title

winratiopower -- calculates sample sizes for trials of fixed duration using the Win Ratio for prioritised outcomes.

Syntax

winratiopower ,
outcome(outcome_type outcome_options) [
power(number)
n(number)
alpha(number)
nratio(number)
]

Description

The win ratio was introduced in 2012 by Pocock et al [1] as a novel approach to the analysis of composite endpoints in randomised clinical trials.
The approach motivated by the Finkelstein–Schoenfeld test [2] takes into account the order of importance of the component events and also allows the components to be different types of outcomes
e.g. time-to-event (failure or success), quantitative outcomes such as quality of life scores and vital signs, repeated events, and more.

winratiopower has been developed to enable sample size calculations
without the need for complex and time-consuming simulations. The sample size calculations are based on the formula of Yu and Ganju [3]. A fixed trial duration is assumed. Independence between outcomes at different levels of the hierarchy is
assumed.

Options

outcome(outcome_type outcome_options) is a repeated option. It is used to specify the type of outcome along with information about the anticipated treatment effect at each level of the hierarchy, starting with the first
(most important) outcome through to the last (least important) outcome.

outcome_type will be: b for binary outcomes, c for continous outcomes, r for repeat event outcomes, tf for time to failure outcomes or ts for time to success outcomes.

outcome_options differs depending on the type of outcome. This is explained in detail below:

binary outcomes require proportions(p1 p2) and win(winoption). p1 and p2 are the expected proportion with the event in the intervention and control groups respectively. winoption will be either noevent or
event to indicate whether a win is represented by not having the event, or having the event, respectively.

continuous outcomes require means(m1 m2) , sd(s1 s2) and win(winoption).
m1 and m2 are the expected means in the intervention and control groups respectively.
s1 and s2 are the expected standard deviations in the intervention and control groups respectively.
winoption will be either lower or higher to indicate whether a win is represented by lower values, or higher values, respectively.
margin(#) can be used to specify that a margin of success of size # will be required for a win.
Caclulations are based on the assumption that the continuous outcome is normally distributed. The sample size calculator will not work as expected if this assumption is not (approximately) met.

repeat event outcomes require means(m1 m2) and win(winoption).
dispersion(d) is optional with a default value for d of 0.
m1 and m2 are the expected mean event rates in the intervention and control groups respectively.
winoption will be either fewer or more to indicate whether a win is represented by having fewer, or more events, respectively.
d is the expected dispersion. Repeat events are assumed to follow a negative binomial model. The dispersion parameter represents the degree of over-dispersion.
The negative binomial model can be written as a Gamma-Poisson mixture, and dispersion represents the variance of the gamma distribution. Larger values imply a greater tendency for events to cluster in high-risk patients. The default value is 0,
implying no overdispersion (i.e. events do not cluster at all
and follow a Poisson distribution) - whether or not this is realistic depends on the specific application.

time-to-event outcomes (whether ts or tf) require eventprob(p) and hr(hr).
p is the expected event probability in the control group.
hr is the expected hazard ratio. For a treatment benefit we require hr<1 for tf and hr>1 for ts.

power is the required power for the trial and must lie between 0 and 1. power(0.8) i.e. 80% power, is the default.

n is the total sample size; required when computing power for a given sample size.

alpha is the required significance level for the trial, and must lie between 0 and 1. alpha(0.05) i.e. 5% significance level, is the default.

nratio is the ratio of sample sizes, N2/N1. nratio(1) i.e. 1:1 randomisation, is the default.

Examples

Example 1:
Consider a trial with 3 prioritised outcomes, (i) time-to-death (ii) number of heart failure hospitalisation and (iii) change in KCCQ score (a continuous measure of quality of life).

Suppose we expect: (i) 20% of patients in the control group will die, and that the hazard ratio for the experimental arm is 0.9.
(ii) There will be an average of 0.5 heart failure hospitalisations per patient in the experimental arm and 0.7 in the control arm.
There will be moderate clustering of heart failure hospitalisations such that the dispersion parameter is set to 1.
(iii) KCCQ score will improve by on average 15 in the experimental arm and 10 in the control arm.
The standard deviation of the change in KCCQ score will be 20 in both arms.

If we wish to calculate the sample size required for 85% power in such a study at a 5% significance level, the command syntax would be:

winratiopower , outcome(tf eventprob(0.2) hr(0.9)) outcome(r mean(0.5 0.7) win(fewer) dispersion(1)) outcome(c mean(15 10) sd(20 20) win(higher)) power(0.85)

Saved results

winratiopower stores the following in r():

Scalars

r(sigma^2) sigma^2 as defined in Yu and Ganju [3]. The variance of the log win ratio will be approximately equal to sigma^2/N

r(N) Total number of patients required

r(winratio) True win ratio under user-provided assumptions

r(wins) Expected proportion of wins

r(losses) Expected proportion of losses

r(ties) Expected proportion of ties

r(wins#) Expected proportion of wins at level #

r(losses#) Expected proportion of losses at level #

r(ties#) Expected proportion of ties at level #

r(power) Estimated power for given sample size (if n is specified)

References

1. Pocock SJ, Ariti CA, Collier TJ, Wang D. The win ratio: a new approach to the analysis of composite endpoints in clinical trials based on clinical priorities. Eur Heart J 2012;33:176–182.

2. Finkelstein DM, Schoenfeld DA. Combining mortality and longitudinal measures in clinical trials. Stat Med 1999;18:1341–1354.

3. Yu RX, Ganju J. Sample size formula for a win ratio endpoint. Stat Med 2022 Mar 15;41(6):950-963.

Authors

Tim Collier, Medical Statistics Department, London School of Hygiene and Tropical Medicine, tim.collier@lshtm.ac.uk

John Gregson, Medical Statistics Department, London School of Hygiene and Tropical Medicine, john.gregson@lshtm.ac.uk