Exact Tests and Confidence Intervals for 2x2 Tables
Overview
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. Gives confidence intervals compatible with exact McNemar's or sign tests (Fay and Lumbard, 2021, DOI:10.1002/sim.8829). For review of these kinds of exact tests see Fay and Hunsberger (2021, DOI:10.1214/21-SS131).
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 22 (9 internal)includes a package overview page
- Examples that run
- 94%15 run in a plain check · 1 never run
- Exported functions with examples
- 76%
- Documented parameters
- 97%
- Return-value docs
- 95%
- Help pages citing references
- 100%
Downloads
Dependencies
Installing exact2x2 adds 26 packages (11 with compiled code, 6.7 MB of source tarballs). Heaviest: fs 1.4 MB, jsonlite 1.0 MB, testthat 814 KB.
Code & Tests
People & History
Maintainer since 0.9-1 (2009)
Show 3 peopleHide 3 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.7.0Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.6.92024-01-25 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.6.82023-02-09 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.6.62021-12-09 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.6.52020-08-03 · diff ↗
- 1.6.4.1
- RR 4.0.0 released · 2020-04-24
- 1.6.3.12019-10-16 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.6.32018-07-27 · diff ↗
Show 26 earlier eventsHide 26 earlier events
- RR 3.5.0 released · 2018-04-23
- 1.6.2
- RR 3.4.0 released · 2017-04-21
- 1.5.22017-02-16 · diff ↗ ·
added 27 exports
uncondExact2x2, uncondExact2x2Pvals, fisherCalcMidp, boschloo, unirootGrid, power2gridRatio, power2gridDifference, calcTall, constrMLE.difference, constrMLE.ratio, constrMLE.oddsratio, getDeltaGrid, getPDQD, getPI, getPrange, pickTstat, power2grid, ucControl, createR, fillsquare, getColor, plotRankMat, plotT, orderMat, Power2x2, SS2x2, uncondPower2x2 - RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- 1.4.12015-02-26 · diff ↗
- 1.4.02014-08-25 · diff ↗
- 1.3.0
- RR 3.1.0 released · 2014-04-10
- 1.2-0.02014-03-05 · diff ↗
- RR 3.0.0 released · 2013-04-03
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- 1.1-1.02011-04-24 · diff ↗
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- 1.1-0.02010-10-06 · diff ↗
- 1.0-1.12010-07-30 · diff ↗
- 1.0-12010-05-27 · diff ↗
- RR 2.11.0 released · 2010-04-22
- 1.0-0
- RR 2.10.0 released · 2009-10-26
- 0.9-3.12009-08-14 · diff ↗
- 0.9-12009-07-22
- RR 2.9.0 released · 2009-04-17
Package metadata
- First published
- 2009-07-22
- Total releases
- 21 / 17 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 2.10
- Download size
- 844 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("exact2x2")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.