Plots two-sided p-values as a function of odds ratios. Can plot three types of p-values: the two-sided Fisher's exact, the central Fisher's exact (i.e., twice the one-sided Fisher's exact), and Blaker's exact.
Creates tests to compare two binomials, giving confidence intervals for either the difference in proportions, the rate ratio, or the odds ratio. The 95 percent confidence intervals have been shown to guarantee nominal coverage by extensive numerical calculations. It has been theoretically proven that the p-values from the one-sided tests on the null hypothesis of equality match Fisher's exact p-values.
There are 4 main functions in the package. The exact2x2 function calculates the exact conditional tests with matching confidence intervals as detailed in Fay (2010a,2010b). The functions ss2x2 and power2x2 calculate the sample size and power related to the tests of exact2x2. Finally, the binomMeld.test function calculates melded confidence intervals for two sample binomial inferences (see Fay, Proschan, and Brittain, 2014).
The function exact2x2Pvals can calculate p-values for a vector of odds ratios. The function exact2x2CI is the code that calculates the confidence intervals for the two-sided Fisher's exact test and Blaker's exact test.
exact2x2
(Package: exact2x2) :
Exact Conditional Tests for 2 by 2 Tables of Count Data
Performs exact conditional tests for two by two tables. For independent binary responses, performs either Fisher's exact test or Blaker's exact test for testing hypotheses about the odds ratio. The commands follow the style of fisher.test, the difference is that for two-sided tests there are three methods for calculating the exact test, and for each of the three methods its matching confidence interval is returned (see details). For paired binary data resulting in a two by two table, performs an exact McNemar's test.