[R] Power calculation using pwr.t.test()
David Winsemius
dwinsemius at comcast.net
Sun Jun 24 19:22:07 CEST 2012
On Jun 24, 2012, at 11:41 AM, Jokel Meyer wrote:
> Dear R experts,
>
> I have conducted a power calculation in order to estimate the number
> of
> subjects needed to detect an effect size of d=0.28 (cohen's d) for a
> difference between two independent groups (alpha level should be
> 0.05 and
> the effect should be detected with 80% probability).
> The results from the code below indicates that I would need n=400
> subjects
> (200 in each group). This is seems so incredibly high that I
> mistrust my
> results & wanted to ask whether I miscalculated n?
>
> library(pwr)
> pwr
> .t
> .test
> (d
> =
> 0.28
> ,sig.level=0.05,power=0.8,type="two.sample",alternative="two.sided")
Your reaction is typical for inexperienced researchers who conduct
power analyses. An effect size of .28 is considered a "small effect
size" so it should not seem unreasonable that you would need 200 per
group. As a quick check I Googled for an online sample size
calculator and the first one I used reported the need for 202 per
group for a two sided test at those levels.
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list