Abstract
Background/aims:
The stepped-wedge design has been extensively studied in the setting of the cluster randomized trial, but less so for the individually randomized trial. This article derives the optimal allocation of individuals to treatment sequences. The focus is on designs where all individuals start in the control condition and at the beginning of each time period some of them cross over to the intervention, so that at the end of the trial all of them receive the intervention.
Methods:
The statistical model that takes into account the nesting of repeated measurements within subjects is presented. It is also shown how possible attrition is taken into account. The effect of the intervention is assumed to be sustained so that it does not change after the treatment switch. An exponential decay correlation structure is assumed, implying that the correlation between any two time point decreases with the time lag. Matrix algebra is used to derive the relation between the allocation of units to treatment sequences and the variance of the treatment effect estimator. The optimal allocation is the one that results in smallest variance.
Results:
Results are presented for three to six treatment sequences. It is shown that the optimal allocation highly depends on the correlation parameter
Conclusion:
This article provides the methodology for designing individually randomized stepped-wedge designs, taking into account the possibility of attrition. As such it helps researchers to plan their trial in an efficient way. To use the methodology, prior estimates of the degree of attrition and intraclass correlation coefficient are needed. It is advocated that researchers clearly report the estimates of these quantities to help facilitate planning future trials.
Introduction
Since the study by Hussey and Hughes, 1 the stepped-wedge design has gained increasing attention in the medical statistical literature. The stepped-wedge design is a special type of the cross-over design2,3 in which cross-over only occurs from the control to the intervention condition. This is illustrated in Figure 1, in which five treatment sequences can be distinguished. In this figure, all sequences start in the control condition and at the beginning of each time period one sequence crosses over to the intervention. As both treatment conditions are available within each sequence, the design is more efficient than the multi-period parallel-group design with the same number of time periods. Furthermore, it may result in easier recruitment because everyone will eventually receive the intervention condition.

Graphical representation of a stepped-wedge design with five sequences.
The implementation of a stepped-wedge design has seen an increasing use in cluster randomized trials.4,5 With such designs, complete clusters, such as households, family practices or clinics are randomized to treatment sequences. Of course, it is also possible to implement the stepped-wedge design in an individually randomized trial. 6 Examples are trials to treat obstructive sleep apnoea, 7 chronic constipation, 8 malformations,9,10 dementia, 11 to reduce household air pollution 12 and to evaluate self-management support programmes 13 and spillover of HIV knowledge. 14 The design of the individually randomized stepped-wedge design has not yet been thoroughly explored in the statistical literature. A recent study evaluated the efficiency of the individually randomized stepped-wedge design in trials with three time periods. 15
Stepped-wedge designs are often implemented such that an equal number of clusters or individuals is assigned to each treatment sequence (i.e. a uniform allocation). However, for cluster randomized trials, it has already been shown that this is not necessarily the best choice.16–18 It is, therefore, expected that a uniform allocation is not the best choice in an individually randomized stepped-wedge design either. The aim of this contribution is to study the optimal allocation of individuals to treatment sequences and the relative efficiency of the uniform allocation as compared to the optimal allocation. Furthermore, to what extent the optimal allocation changes if the study is hampered by attrition of individuals over time will also be studied.
This contribution is organized as follows. In the ‘Methods’ section, the statistical model that relates outcome to time period and treatment condition is introduced and it is shown how the treatment effect and its variance are estimated in studies without and with attrition. The variance of the treatment effect estimate is used as optimality criterion and this section also shows how constrained optimization is used to numerically derive the optimal allocation to treatment sequences. The ‘Results’ section presents optimal allocations for three to six sequences along with the efficiency of the uniform allocation relative to the optimal allocation. The optimal allocations may not always be feasible from a practical point of view and the ‘Methods’ section deals with optimal allocations where the proportions of individuals allocated to each sequence are bounded by an upper and lower limit. Conclusion and discussion are given in the last section.
Methods
Statistical model
All individuals start in the control condition, and in each time period a number of individuals crosses over the intervention. The number of time periods T in a stepped-wedge design as depicted in Figure 1 is
Here,
The model can be written in matrix–vector notation. The model for individual
where
is the vector of length
is the
is the vector of length
is the vector of length
is the
Given an estimate
with corresponding variance–covariance matrix
The treatment effect estimate
The stepped-wedge design is a multi-period design, and it is very likely individuals drop out during the course of the study. The last observation of individual
The proportion individuals allocated to sequence
In practical settings, the lower and upper bounds 0 and 1 for
A simple equation for the relation between the allocation
Relative efficiency
Once the optimal allocation has been derived, it can be compared to the uniform allocation. The relative efficiency quantifies the loss of efficiency of using the uniform allocation
Results
Optimal allocation to treatment sequences
Figure 2 shows the optimal allocation to treatment sequences as a function of the correlation parameter

Optimal allocation of individuals to three, four, five or six treatment sequences in case attrition is absent.
Figures 3 and 4 show optimal proportions for a constant attrition rate of

Optimal allocation of individuals to three, four, five or six treatment sequences for a constant attrition rate,

Optimal allocation of individuals to three, four, five or six treatment sequences for a constant attrition rate,
Figure 5 shows the relative efficiencies of the uniform allocation against the optimal allocations that were presented in Figures 2 –4. In all cases, the relative efficiency is at least 0.8 and the loss of efficiency increases with increasing number of sequences. The filled circle lines show the relative efficiencies, in case attrition is absent. In all four panels, larger values are observed for larger values of

Efficiency of the uniform allocation relative to the optimal allocation.
Constrained optimal allocation to treatment sequences
The results in Figures 2 –4 show that for some values of
Consider as an example a trial with four sequences without attrition (top right panel of Figure 2). Suppose an a priori estimate of the within-person correlation is
Figure 6 shows an example of an optimal allocation with such constraints for a trial with four sequences and absent attrition. The left panel gives the optimal proportions for user-selected constraints on the lower and upper bound

Constrained optimal allocation for four sequences and zero attrition. Left panel: optimal allocation, right panel: efficiency of the uniform allocation relative to the optimal allocation.
Discussion and conclusion
This contribution showed that uniform allocation to treatment sequences is not always the best choice in an individually randomized stepped-wedge design. In studies where attrition is absent, the optimal allocation is almost equal to the uniform allocation in case the repeated measures within an individual are highly correlated. For lower correlations, the optimal proportions may vary much across the sequences. For trials with attrition and a high within-individual correlation, the optimal proportion becomes larger if the sequence has its treatment switch earlier in time. Furthermore, the efficiency of the uniform design decreases when more periods are included in the design, which mirrors the finding for the cohort cluster randomized stepped-wedge designs with a compound symmetry correlation structure.
17
For all number of sequences
R syntax to calculate the optimal allocation to sequences can be found on my Github page. The optimal allocation is locally optimal, meaning it depends on the correlation parameter
The stepped-wedge design is a longitudinal design and is therefore subject to attrition. This contribution studied optimal allocation for attrition that was constant across time and future research may focus on attrition rates that change over time. In my previous research on longitudinal studies, I used the Weibull survival function, which allows for monotonically increasing or decreasing attrition over time.23,24 It would be of interest to study how the optimal allocation of an individually stepped-wedge design behaves under such attrition. This contribution also assumed that attrition is constant across individuals. Future research may focus on optimal allocations when attrition depends on, for instance, the treatment sequence. For instance, attrition may be higher for individuals in the less interesting control condition than those in the intervention condition. It may then be expected that more individuals are allocated to those sequences that have their treatment switch earlier in time.
Missing data are often considered a burden: they make the design incomplete rather than complete and hence result in a loss of efficiency. However, incomplete designs may be considered a priori if the aim is to minimize the number of measurements rather than the number of individuals. In the social science literature, such designs are known as planned missing data designs. 25 An example is the so-called dog-leg design 26 and it may be interesting to study optimal allocations to treatment sequences for such a design.
Another design for which it may be interesting to study the optimal allocation is the so-called hybrid design or sandwich stepped-wedge design.16,27,28 This is a combination of the multi-period parallel-group design and the stepped-wedge design. For cluster randomized trials with large samples, this design has been shown to be more efficient than the stepped-wedge design. It would be interesting to see if this result translates to the individually randomized stepped-wedge design and how the optimal allocation is affected by attrition.
It should finally be mentioned that this contribution assumes a sustained effect of treatment. This assumption does not always hold in practice: the effect of treatment may be pronounced shortly after the treatment switch, but then stabilize or even decrease later in time if the initial treatment benefits are washed out over time. This may be taken into account in the statistical model by allowing for differential treatment effects after the treatment switch. The allocation that is optimal for one such treatment effect may not be so for another. To derive an ‘overall’ optimal allocation, one may derive a so-called
To my knowledge, this is one of the first studies on the efficient design of the individually randomized stepped-wedge design. I hope the results in this article will help medical scientists to design their trial in an efficient way. I also hope this contribution will increase methodological interest in the individually randomized stepped wedge, so that more guidelines for its design and analysis will become available in the near future.
Footnotes
Declaration of conflicting interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
