powered by
Calculate by simulation the power of Fisher's exact test for comparing two proportions given two margin counts.
power.fisher.test(p1, p2, n1, n2, alpha=0.05, nsim=100, alternative="two.sided")
Estimated power of the test.
first proportion to be compared.
second proportion to be compared.
first sample size.
second sample size.
significance level.
number of data sets to simulate.
indicates the alternative hypothesis and must be one of "two.sided", "greater" or "less".
Gordon Smyth
Computes the power of Fisher's exact test for testing the null hypothesis that p1 equals p2 against the alternative that they are not equal.
p1
p2
fisher.test, power.t.test
fisher.test
power.t.test
power.fisher.test(0.5,0.9,20,20) # 70% chance of detecting difference
Run the code above in your browser using DataLab