I need to calculate the sample size for the number of clusters and the number of participants in a stepped wedge RCT that I'm going to run.
I ran the following code in stata and inputting the design matrix into the stata data editor:
The values in the steppedwedge command are based on the known variables I've got:
Some of the variations give me large sample sizes but the power is far more than I needed. I was aiming for 80% power, but most of these variations give me over 90% power.
OR
OR
OR
I ran the following code in stata and inputting the design matrix into the stata data editor:
steppedwedge, power incomplete(1) alpha(0.05) rho(0.0267183) m(75) mu1(7.6) sd1(3.9) mu2(10.4) sd2(5.0)
- m= 75 because the mean cluster size is 75.
- rho = 0.0267183, the ICC is 0.0267183 analysed from a routintely-collected dataset of individual-level data
- mu1 and sd1 7.6 (3.9)
- mu2 and sd2 = 10.4(5.0) - these were from a previous RCT
- I wanted three steps
- Beta = 0.80
- Alpha = 0.05
Some of the variations give me large sample sizes but the power is far more than I needed. I was aiming for 80% power, but most of these variations give me over 90% power.
Code:
clear input str31 var1 float(var2 var3) 1 1 1 0 1 1 0 0 1 end
Code:
clear input byte var1 float(var2 var3) 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 end
Code:
clear input byte var1 float(var2 var3) byte var4 . 1 1 1 . 1 1 1 . 1 1 1 0 . 1 1 0 . 1 1 0 . 1 1 0 0 . 1 0 0 . 1 0 0 . 1 end
Code:
clear input byte var1 float(var2 var3) byte var4 . 1 1 1 0 . 1 1 0 0 . 1 end