[R] Proper power computation for one-sided binomial tests.
collinl at cs.pitt.edu
Tue Sep 23 22:36:14 CEST 2008
Hi, I trying to determine the best way to compute the power for a
one-sample one-sided binomial test. Specifically I need to sample a
population of individuals and ask whether a sample rate of 0% is
compatable with a minimum threshold of 3% and how many samples are needed.
I have made use of power.prop.test but I am not sure if a) that is the
correct (or best) function to use and b) if the output is quite right.
Here is a sample run:
> power.prop.test(p1=0, p2=0.03, sig.level=0.05, power=0.90,
Two-sample comparison of proportions power calculation
n = 279.3004
p1 = 0
p2 = 0.03
sig.level = 0.05
power = 0.9
alternative = one.sided
NOTE: n is number in *each* group
This is an attempt to test whether a sample of 0% occurrance is compatable
with an a-priori probability of 3% at the specified significance levels.
My questions are those above, and, as a followup whether the caveat about
n being the number in each group means that I need to sample twice that
number in a single group. I don't believe so but I want to be sure.
Thanks in advance,
More information about the R-help