Description Usage Arguments Value Author(s) See Also Examples
Computes the power of fishers exact test by means of simulation.
1 | fisherPower(pA, pB, nA, nB, alpha = 0.05, nRepl = 1000)
|
pA |
True proportion in 1st sample. Not to be confused with odds. |
pB |
True proportion in 2nd sample. Not to be confused with odds. |
nA |
Size of 1st sample. |
nB |
Size of 2nd sample. |
alpha |
Alpha error (default 0.05). |
nRepl |
Number of simulations to be performed. |
The power of the test, i.e. 1-Beta.
David Kneis david.kneis@tu-dresden.de
Method power.fisher.test
from package statmod
yields essentially the same results.
1 2 3 4 5 6 7 8 9 10 | nA <- 814
pA <- 29/814
nB <- 276
pB <- 1/276
print(fisherPower(pA, pB, nA, nB))
## Not run:
library("statmod")
power.fisher.test(p1=pA, p2=pB, n1=nA, n2=nB, alpha=0.05, nsim=1000, alternative="two.sided")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.