Hi all,

I have performed a binomial test to verify if the number of males in a study is 
significantly different from a null hypothesis (say, H0:p of being a male= 0.5).
For instancee:
binom.test(10, 30, p=0.5, alternative="two.sided", conf.level=0.95)

    Exact binomial test

data:  10 and 30
number of successes = 10, number of trials =
30, p-value = 0.09874
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
 0.1728742 0.5281200
sample estimates:
probability of success 
             0.3333333 

This way I get the estimated proportion of males (in this case p of success) 
that is equal to 0.33 and an associated p-value (this is not significant at 
alpha=0.05 with respect to the H0:P=0.5).

Now, I want to know, given a power of, say, 0.8, alpha=0.05 and the above 
sample size (30), what is the minimum proportion of males as low or as high 
(two sided) like to be significantly detected with respect to a H0 (not 
necessarily H0:P=0.5 - I am interested also in other null hypotheses). In other 
words, I would have been able to detect a significant deviation from the H0 for 
a given power, alpha and sample size if the proportion of males would have been 
more than Xhigh or less than Xlow.

I have had a look at the "pwr" package but it seems to me it doesn't allow to 
calculate this.
I would appreciate very much any suggestion.

                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to