Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2016 May 10.
Published in final edited form as: Contemp Clin Trials. 2015 Sep 21;45(Pt B):338–339. doi: 10.1016/j.cct.2015.09.011

A note on “Design and analysis of stepped wedge cluster randomized trials”

Xiaomei Liao 1,2, Xin Zhou 1,2, Donna Spiegelman 1,2
PMCID: PMC4861952  NIHMSID: NIHMS775671  PMID: 26394003

Editor

Hussey and Hughes [1] seminal paper on the design and analysis of stepped wedge cluster randomized trials (SWD) is an important contribution to the literature. In this paper, they derived the variance formula for the intervention effect in a SWD assuming a time effect, and also compared the relative efficiency for some alternative estimates assuming no time effect. In the course of our own research on SWDs, we found an error in Eq. (9) of Section 3.5 in the paper, in which a factor of T was missing in the denominator. Appendix A gives the correct derivation of the variance of the generalized least squares estimator for a SWD in a model that assumes no time effect, using the notation of Hussey and Hughes' paper. We believe that SWDs are most useful for the study of relatively short-term outcomes in which the intervention is also short-term, such as in a study we are currently working on that investigates the effect of post-partum IUD insertion on the prevention of unintended pregnancy 1.5 years later. In such instances, it may be reasonable to assume that there is no time effect in the primary analysis; hence, the correction to the variance that we provide is potentially important for planners of SWDs.

Eq. (9) was given by Hussey and Hughes to illustrate the efficiency advantage of an analysis that includes both between- and within-cluster comparisons (θ̂), relative to that that only considers within-cluster comparisons (θ̃). In Appendix B, we prove that the efficiency advantage they discuss still holds despite the error we discovered, although the relative advantage is less than previously reported and will lessen as T, the number of randomization steps in the SWD, increases, something not readily apparent in the original paper.

Appendix A

Var(θ̂) assuming no time effect

If there are no time effects, the IT × 2 design matrix Z corresponding to the parameter vector η = (μ, θ) for a stepped wedge design is given by Z = [Z1, Z2, ⋯,ZI]', where Zi=[111Xi1Xi2XiT], i = 1,2, ⋯, I. Here Xij is an indicator of the treatment mode in cluster i at time j (1 = intervention; 0 = control).

Then the covariance matrix of the weighted least square (WLS) estimates η̂ is (Z'V−1Z)−1, where V is an IT×IT block diagonal matrix, i.e. V = Diag(V1, V2, ⋯, VI), and each T×T block Vi within V has the structure

Vi=[σ2+τ2τ2τ2τ2τ2τ2τ2τ2τ2σ2+τ2].

Then we can obtain

Vi1=1σ4+Tσ2τ2.[σ2+(T1)τ2τ2τ2τ2τ2τ2τ2τ2τ2σ2+(T1)τ2]. (1)

Hence, (ZV1Z)1=(i=1IZiVi1Zi)1, where each ZiVi1Zi, i = 1,2, ⋯, I, has the form

[k=1Tj=1TVjkk=1T(j=1TVjk)Xikj=1T(k=1TVjk)Xijk=1T(j=1TXijVjk)Xik] (2)

with Vjk as the (j,k) entry of the matrix Vi1 in Eq. (1).

From Eq. (1), we have k=1Tj=1TVjk=Tσ2+Tτ2,j=1TVjk=k=1TVjk=1σ2+Tτ2, and

k=1T(j=1TXijVjk)Xik=k=1T(j=1TXijXik)Vjk=j=1TXij2Vjj+kjXijXikVjk=σ2+(T1)τ2σ4+Tστ2j=1TXij2τ2σ4+Tσ2τ2kjXijXik=1σ2j=1TXij2τ2σ4+Tσ2τ2(j=1TXij)2.

Hence,

ZV1Z=i=1IZiVi1Zi=[ITσ2+Tτ2i=1Ij=1TXijσ2+Tτ2i=1Ij=1TXijσ2+Tτ21σ2i=1Ij=1TXij2τ2σ4+Tσ2τ2i=1I(j=1TXij)2].

Since Xij is an indicator variable, i=1Ij=1TXij=i=1Ij=1TXij2. Denote U=i=1Ij=1TXij,V=i=1I(j=1TXij)2, then

ZV1Z=[ITσ2+Tτ2Uσ2+Tτ2Uσ2+Tτ21σ2Uτ2σ4+Tσ2τ2V],

and it follows that, if there are no time effects, Var(θ̂), i.e. the (2,2) component of (Z'V−1Z)−1, is given by

Var(θ^)=IT(σ2+Tτ2)σ2(ITUU2)σ2+IT(TUV)τ2.

Thus, Eq. (9) of Section 3.5 in Hussey and Hughes [1] should be

effic(θ^,θ˜)=Var(θ˜)Var(θ^)=i(1wi+1Twi)[(ITUU2)σ2+IT(TUV)τ2]I3T(σ2+Tτ2),

which has an extra factor T on the denominator comparing to the original Eq. (9) in Hussey and Hughes [1].

Appendix B

The variance of the WLS estimator, Var(θ̂), is less than or equal to the variance of the within-cluster estimator, Var(θ̃), even with the extra factor, T, included in Var(θ̂)

To prove that Var(θ̂) is smaller than or equal to Var(θ̃), even with the extra factor, T, included in Var(θ̂), we first write U=i=1I(Twi)=ITi=1Iwi,V=i=1I(Twi)2=IT22Ti=1Iwi+i=1Iwi2. Hence,

effic(θ^,θ˜)=T(i=1I1wi(Twi))[(UU2TI)σ2+(UVT)Tτ2]I2σ2+Tτ2=T(i=1I1wi(Twi))[(i=1Iwi(i=1Iwi)2TI)σ2+(i=1Iwii=1Iwi2T)Tτ2]I2(σ2+Tτ2),

and using the fact i=1Iwi2(i=1Iwi)2I from the Cauchy-Schwarz inequality, we obtain

effic(θ^,θ˜)T(i=1I1wi(Twi))(i=1Iwii=1Iwi2T)I2=1I2(i=1I1wi(Twi))(i=1Iwi(Twi))1,

where the last inequality holds from the Cauchy-Schwarz inequality as well, completing the proof.

Reference

  • 1.Hussey MA, Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemp. Clin. Trials. 2007;28:182–191. doi: 10.1016/j.cct.2006.05.007. [DOI] [PubMed] [Google Scholar]

RESOURCES