Unconditional Exact Test
Overview
Performs unconditional exact tests and power calculations for 2x2 contingency tables. For comparing two independent proportions, performs Barnard's test (1945) doi:10.1038/156177a0 using the original CSM test (Barnard, 1947 doi:10.1093/biomet/34.1-2.123), using Fisher's p-value referred to as Boschloo's test (1970) doi:10.1111/j.1467-9574.1970.tb00104.x, or using a Z-statistic (Suissa and Shuster, 1985, doi:10.2307/2981892). For comparing two binary proportions, performs unconditional exact test using McNemar's Z-statistic (Berger and Sidik, 2003, doi:10.1191/0962280203sm312ra), using McNemar's conditional p-value, using McNemar's Z-statistic with continuity correction, or using CSM test. Calculates confidence intervals for the difference in proportion. This package interacts with pre-computed data available through the ExactData R package, which is available in a 'drat' repository. Install the ExactData R package from GitHub at https://pcalhoun1.github.io/drat/. The ExactData R package is approximately 85 MB.
- Fixed an error where the p-value was sometimes incorrect for imbalanced designs. Only occurred when the p-value would be large, but exact test gave a much higher p-value. Thanks to Andrea Smith for pointing out the issue
From inst/NEWS.Rd in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 7includes a package overview page
- Examples that run
- 100%6 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 98%
- Return-value docs
- 100%
- Help pages citing references
- 86%
Downloads
Dependencies
Installing Exact adds 1 package (1 with compiled code, 492 KB of source tarballs). Heaviest: rootSolve 492 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 3.3Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 3.22022-09-26 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 3.12021-11-26 · diff ↗
- 3.0
- RR 4.1.0 released · 2021-05-18
- 2.12020-10-03 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.0
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
Show 14 earlier eventsHide 14 earlier events
- 1.72016-10-22 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 1.62015-05-26 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 1.52015-03-28 · diff ↗
- RR 3.1.0 released · 2014-04-10
- 1.42013-07-22 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 1.32013-02-23 · diff ↗
- 1.22013-02-23 · diff ↗
- 1.12012-08-19 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 1.02012-03-22
- RR 2.14.0 released · 2011-10-31
Package metadata
- First published
- 2012-03-22
- Total releases
- 14 / 14 yrs
- License
- GPL-2 OSI
- Additional repositories
- pcalhoun1.github.io
- Minimum R
- ≥ 3.5.0
- Download size
- 44 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("Exact")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.