A Menu-Driven Facility for Power and Detectable-Difference Calculations in Stepped-Wedge Cluster-Randomized Trials

This article introduces the Stata menu-driven program steppedwedge, which calculates detectable differences and power for stepped-wedge randomized trials. The command permits continuous, binary, and rate outcomes (with normal approximations) for comparisons using two-sided tests. The command allows specification of the number of clusters randomized at each step, the number of steps and the average cluster (cell) size, or an incomplete design in which the user spec-ifies the design pattern (a matrix with one row per cluster, one column per time point, and entries indicating exposure and observable data). Cluster heterogeneity can be parameterized using either the intracluster correlation or the coefficient of variation (of the outcome). The command is illustrated via examples.