+ Reply to Thread
Results 1 to 7 of 7

Thread: Sample size for a paired t-test

  1. #1
    Points: 8,343, Level: 61
    Level completed: 65%, Points required for next Level: 107

    Posts
    278
    Thanks
    14
    Thanked 7 Times in 7 Posts

    Sample size for a paired t-test




    Hello all

    I have a simple question. I need to calculate a sample size for a study that will be analyzed with a paired t-test.

    One of the input parameters for the calculation, is the standard deviation of the differences. However, I do not know it. What I do know, is the standard deviation of the first group and the standard deviation of the second group.

    Each subject will receive two treatments. A continuous measure will be taken after each. I know what is the standard deviation of the measure after the 1st treatment and I know what is the standard deviation of the measure after the 2nd treatment, but the standard deviation of D, I don't know.

    SAS proc power allows to enter the standard deviations I do know, but I have no idea how from there they estimate the difference standard deviation. PASS on the other hand (which is a remarkable sample size software) asks directly for the difference standard deviation, which I don't know.

    My question is, how do I estimate the difference standard deviation ? Via simulation ?

  2. #2
    ggplot2orBust
    Points: 71,220, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    User with most referrers
    trinker's Avatar
    Location
    Buffalo, NY
    Posts
    4,417
    Thanks
    1,811
    Thanked 928 Times in 809 Posts

    Re: Sample size for a paired t-test

    I don't know if this is correct but what about using the pooled sd?
    "If you torture the data long enough it will eventually confess."
    -Ronald Harry Coase -

  3. #3
    Points: 8,343, Level: 61
    Level completed: 65%, Points required for next Level: 107

    Posts
    278
    Thanks
    14
    Thanked 7 Times in 7 Posts

    Re: Sample size for a paired t-test

    this is probably somehow correct, however I have one slight problem. In order to calculate a pooled variance I need N, which is my unknown parameter in the first place.

  4. #4
    ggplot2orBust
    Points: 71,220, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    User with most referrers
    trinker's Avatar
    Location
    Buffalo, NY
    Posts
    4,417
    Thanks
    1,811
    Thanked 928 Times in 809 Posts

    Re: Sample size for a paired t-test

    oh yeah.
    "If you torture the data long enough it will eventually confess."
    -Ronald Harry Coase -

  5. #5
    ggplot2orBust
    Points: 71,220, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    User with most referrers
    trinker's Avatar
    Location
    Buffalo, NY
    Posts
    4,417
    Thanks
    1,811
    Thanked 928 Times in 809 Posts

    Re: Sample size for a paired t-test

    Could you use a different program? N is calculated based on test, effect size, alpha (usually .05) and power (usually .8). Basically if you know the effect size here you're in good shape. The program I often use is G-power. It's free and easy to use and works great for simpler models. http://www.psycho.uni-duesseldorf.de...n/aap/gpower3/
    "If you torture the data long enough it will eventually confess."
    -Ronald Harry Coase -

  6. #6
    Points: 8,343, Level: 61
    Level completed: 65%, Points required for next Level: 107

    Posts
    278
    Thanks
    14
    Thanked 7 Times in 7 Posts

    Re: Sample size for a paired t-test

    I found it:

    \sigma _{diff}=\sqrt{\sigma _{1}^{2}+\sigma _{2}^{2}-2\cdot \rho \cdot \sigma _{1}\cdot \sigma _{2}}

    (sorry about LateX, don't know what's wrong)

    I saw it in SAS details manual, however, I still don't know where this formula came from (anyone recognize it ?)

    I tried the formula and I have some answers. PASS calculates using a 0 correlation, I tried calculating the standard deviation of differences using the formula with correlation 0, ran it in Gpower you recommended, and got a match.

    Then I used correlation 0.3 and 0.5, but in Gpower and SAS, and got a match.

    What I am saying is, that all software are working fine, I only wish I knew this formula, could have saved me a long long time.

    The nice part, I tried simulating data with means and standard deviations like mine, and got same result like the formula gave...
    Last edited by Dason; 10-17-2013 at 08:17 AM.

  7. #7
    Devorador de queso
    Points: 95,940, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Sample size for a paired t-test


    It's just using

    Var(X - Y) = Var(X) + Var(Y) -2Cov(X, Y)
    I don't have emotions and sometimes that makes me very sad.

  8. The Following User Says Thank You to Dason For This Useful Post:

    trinker (10-17-2013)

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats