Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stepped Wedge Sample Size calculation

    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:
    steppedwedge, power incomplete(1) alpha(0.05) rho(0.0267183) m(75) mu1(7.6) sd1(3.9) mu2(10.4) sd2(5.0)
    The values in the steppedwedge command are based on the known variables I've got:
    • 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
    However, I got stuck on inputting the design matrix into the stata data editor. I got stuck trying to work out which of four variations I needed. I was wondering if anyone could provide any advice on whether this is the most appropriate code, and which design effect I should have in the data editor (if that's the most appropriate way to do it.

    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
    OR

    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
    OR

    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
    OR

    Code:
    clear
    input byte var1 float(var2 var3) byte var4
    . 1 1 1
    0 . 1 1
    0 0 . 1
    end
    Last edited by Tabitha Green; 30 Nov 2023, 13:25.
Working...
X