Cluster Randomized and Multi-Level Designs
Sample size planning for a parallel two-group cluster-randomized trial with a continuous outcome. Calculates the required number of clusters per arm while accounting for the intracluster correlation coefficient (ICC), average cluster size, and variation in cluster size. Runs entirely in your browser.
This calculator implements the method documented in the statistical literature/this method for Tests for Two Means in a Cluster-Randomized Design. Whole clusters are randomized to treatment or control, while the continuous outcome is measured on individuals within those clusters. The calculation uses a modified two-sample t-test with the degrees of freedom based on the total number of subjects.
For group i, the variance of the estimated group mean is approximated from the subject-level variance, the design effect, the relative efficiency associated with unequal cluster sizes, the number of clusters, and the average cluster size.
Here, ρ is the intracluster correlation coefficient, M is the average cluster size, and COV is the coefficient of variation of cluster sizes. The design effect accounts for correlation among subjects within the same cluster. The relative-efficiency term inflates the variance when cluster sizes vary rather than remaining equal.
For equal numbers of clusters in the two arms, the standard error of the difference in means is √(V1 + V2). The noncentrality parameter is therefore the assumed mean difference divided by this standard error. The two-sided critical value comes from the central t distribution with degrees of freedom equal to the total number of subjects minus two.
The calculator evaluates the power using the noncentral t distribution and searches upward over the integer number of clusters per arm until the requested power is reached. This is important because cluster counts must ultimately be whole numbers.
the relevant methodological literature provides a validation example based on Campbell and Walters (2014). With a two-sided α = 0.05, target power of 0.90, mean difference δ = 0.3247, standard deviation σ = 1, ICC ρ = 0.05, average cluster size M = 10, and COV = 0, the smallest number of clusters per arm is 29. This gives 29 clusters in each arm, 58 total clusters, 290 subjects per arm, and 580 subjects overall.
When the same assumptions are used with COV = 0.725, the this method validation example gives 33 clusters per arm, or 66 clusters and 660 subjects overall. The implementation here reproduces those results.
The result is the required number of randomized clusters, not merely the number of individual participants. Because subjects within the same cluster are correlated, simply applying an ordinary individually randomized two-sample t-test sample size will generally underestimate the required trial size when the ICC is positive. Variation in cluster sizes can require additional clusters as well.