Calculates Fisher's exact test, Blaker's exact test, or the exact McNemar's test with appropriate matching confidence intervals. Provides power and sample size calculations. Also gives melded confidence intervals for the binomial case.

Exact Tests and Confidence Intervals for 2x2 Tables
Calculates conditional exact tests (Fisher's exact test, Blaker's exact test, or  exact McNemar's test) and unconditional exact tests (including score-based tests on differences in proportions, ratios of proportions, and odds ratios, and Boshcloo's test) with appropriate matching confidence intervals, and provides power and sample size calculations. Also gives melded confidence intervals for the binomial case.

Michael P. Fay, Sally A. Hunsberger, Martha Nason, Erin Gabriel
Calculates conditional exact tests (Fisher's exact test, Blaker's exact test, or  exact McNemar's test) and unconditional exact tests (including score-based tests on differences in proportions, ratios of proportions, and odds ratios, and Boshcloo's test) with appropriate matching confidence intervals, and provides power and sample size calculations. Gives melded confidence intervals for the binomial case. Gives boundary-optimized rejection region test (Gabriel, et al, 2018, <DOI:10.1002/sim.7579>), an unconditional exact test for the situation where the controls are all expected to fail.

Michael P. Fay [aut, cre],
Sally A. Hunsberger [ctb],
Martha Nason [ctb],
Erin Gabriel [ctb],
Keith Lumbard [ctb]
Calculates conditional exact tests (Fisher's exact test, Blaker's exact test, or  exact McNemar's test) and unconditional exact tests (including score-based tests on differences in proportions, ratios of proportions, and odds ratios, and Boshcloo's test) with appropriate matching confidence intervals, and provides power and sample size calculations. Gives melded confidence intervals for the binomial case (Fay, et al, 2015, <DOI:10.1111/biom.12231>). Gives boundary-optimized rejection region test (Gabriel, et al, 2018, <DOI:10.1002/sim.7579>), an unconditional exact test for the situation where the controls are all expected to fail.
testthat, Exact (>= 2.0), ggplot2, grid, gridExtra