Announcement

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

  • Cohen's d and f^2 estimation and sample size

    I am trying to determine the sample size for an upcoming study, however we have no currently available pilot data. The power calculations for Stata all appear to require information from pilot studies. I was hoping there might exist a command or package to estimate sample sizes based on only the Cohen's D or f^2 values, alpha, and power. Or if there exists a package or command to do the opposite - Calculate Cohen's d or f^2 based on sample size, desired alpha, and desired power alone.

    I can do this online via Daniel Soper's website:
    http://www.danielsoper.com/statcalc3/calc.aspx?id=47
    http://www.danielsoper.com/statcalc3/calc.aspx?id=1

    However I was hoping there was a means of doing this calculation in Stata. (I am using Stata14)

    Thank you!

  • #2
    If you want to calculate the requited sample size for a two independent sample means test with Cohen's d = 0.5, alpha = .05 and desired power of .80 you can do this in Stata as well: Assuming a pooled within sample estimate of the population standard deviation of sd = 1.0, the standardized (and biased) effect size d is equal to a difference of the means of 0.5 (d = (mean2 - mean1)/sd). The corresponding Stata command
    Code:
    power twomeans 0, diff(0.5) power(.80)
    will give you estimated sample sizes of n = 64 per group (assuming the control group mean = 0). Using these data, the Stata command
    Code:
    esizei 64 0.5 1 64 0 1
    shows that Cohen's d (biased effect size) will be in fact 0.5 (Hedges' unbiased effect size g = .497) (because d is independent from n, you could in fact use any n > 1).
    Last edited by Dirk Enzmann; 07 Oct 2015, 13:22.

    Comment


    • #3
      Exactly what I was looking for!

      Thank you Dirk!

      Comment

      Working...
      X