From 146ca5cd2f02c64c3ab3eef2ee0a7a7f2e8eaa01 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 19 Nov 2021 09:34:18 +0100 Subject: gnu: Add r-exact. * gnu/packages/statistics.scm (r-exact): New variable. --- gnu/packages/statistics.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index d7ffa4355f..0bcfe26080 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -6754,3 +6754,32 @@ of methods for only the FKML type. These include maximum likelihood, maximum product of spacings, Titterington's method, Moments, Trimmed L-Moments and Distributional Least Absolutes.") (license license:gpl2+))) + +(define-public r-exact + (package + (name "r-exact") + (version "3.0") + (source + (origin + (method url-fetch) + (uri (cran-uri "Exact" version)) + (sha256 + (base32 "0acm01njg3arlzwknv5v1sdsz5ab0bdh04sn1bmf91hcg3li8qd7")))) + (properties `((upstream-name . "Exact"))) + (build-system r-build-system) + (propagated-inputs `(("r-rootsolve" ,r-rootsolve))) + (home-page "https://cran.r-project.org/package=Exact") + (synopsis "Unconditional Exact Test") + (description + "Performs unconditional exact tests and power calculations for 2x2 +contingency tables. For comparing two independent proportions, performs +@url{doi:10.1038/156177a0, Barnard's test (1945)} using the original CSM +test (@url{doi:10.1093/biomet/34.1-2.123, Barnard (1947)}), using Fisher's +p-value referred to as @url{doi:10.1111/j.1467-9574.1970.tb00104.x, +Boschloo's test (1970)}, or using a Z-statistic (@url{doi:10.2307/2981892, +Suissa and Shuster (1985)}). For comparing two binary proportions, +performs unconditional exact test using McNemar's Z-statistic +(@url{doi:10.1191/0962280203sm312ra, Berger and Sidik (2003)}), using +McNemar's Z-statistic with continuity correction, or using CSM test. +Calculates confidence intervals for the difference in proportion.") + (license license:gpl2))) -- cgit v1.2.3