Announcement

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

  • Power calculation for repeated measures data

    Hello,

    I am trying to do a power calculation for an experiment involving taking repeated measurements from individuals at baseline and after two separate treatments. I have some data from 13 test individuals at baseline, and estimate that treatment 1 will reduce these numbers by 50% and treatment 2 will reduce them by only 25%. I would like to be able find the sample size that would allow me to detect these differences with 80% power.

    My approach has been to construct test data for each treatment and use the power pairedmeans command:

    g treatment1_sim = .5*baseline
    g treatment2_sim = .75*baseline

    summ treatment1_sim
    local treatment1_mean = r(mean)

    summ treatment2_sim
    local treatment2_mean = r(mean)

    summ baseline
    local baseline_mean = r(mean)


    ** Sample size needed to detect difference between treatment1 and baseline
    gen diff = baseline-treatment1
    summ diff
    local standard_dev = r(sd)

    power pairedmeans `treatment1_mean' `baseline_mean', sddiff(`standard_dev') power(.8)

    My problem is that no matter how much I toggle the effect of the treatments (.5 and .75 above), I always end up with the same estimated sample size:7. I am wondering if I am implementing the power pairedmeans command wrong or if this is an artifact of how I simulate the data. Currently, based on how I simulate the treatment test data, treatment and baseline test data have a correlation of 1, and I feel like this might be a problem.

    The baseline test data I am using is:
    baseline
    48599
    54468
    152541
    90670
    53779
    42763
    24001
    35478
    23248
    13477
    37620
    51388
    23209

    Any advice would be very much appreciated.

    Thank you!



  • #2
    One major problem is that your 3 measures are perfectly correlated with each other.

    Code:
    . correlate baseline treatment1_sim treatment2_sim
    (obs=13)
    
                 | baseline tr~1_sim tr~2_sim
    -------------+---------------------------
        baseline |   1.0000
    treatment1~m |   1.0000   1.0000
    treatment2~m |   1.0000   1.0000   1.0000
    This happened because you did not include any random error when generating the treatment 1 and 2 simulated scores.

    I think the corr2data command will work better, given what you are trying to do. HTH.
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      Thank you so much! That solves my problem

      Comment

      Working...
      X