Comprehensive Two-Proportion Inference

Unified methods for comparing two independent or paired proportions. Provides classical, exact, score-based, non-inferiority, equivalence, effect-size, confidence-interval, and stratified procedures with standardized publication-ready output. Farrington-Manning inference is supported through established score-based methods described by Farrington and Manning (1990) and implemented through 'ratesci', while additional established methods are provided through 'DescTools' and base R.


PropTestR 1.0.0

Comprehensive two-proportion inference in R

PropTestR provides a single, standardized interface for comparing two independent or paired proportions, with emphasis on clinical trials, epidemiology, veterinary epidemiology, and biomedical research.

Installation

PropTestR 1.0.0 is currently a source package. Install its CRAN dependencies first:

install.packages(c("DescTools", "DescrTab2"))

Then install the local source package:

install.packages("PropTestR_1.0.0.tar.gz", repos = NULL, type = "source")

Main function

library(PropTestR)

result <- compare_2prop(
  x1 = 82, n1 = 100,
  x2 = 75, n2 = 100,
  method = "all"
)

print(result)
tidy_prop_result(result)
plot_prop_result(result)

Farrington-Manning non-inferiority

farrington_manning(
  x1 = 82, n1 = 100,
  x2 = 85, n2 = 100,
  margin = -0.10,
  alternative = "greater"
)

Equivalence

equivalence_2prop(
  x1 = 80, n1 = 100,
  x2 = 78, n2 = 100,
  margin = 0.10,
  conf.level = 0.90
)

Paired proportions

paired_2prop(b = 15, c = 5, n = 100)
paired_2prop(b = 15, c = 5, n = 100, method = "mcnemar_exact")

Stratified proportions

stratified_2prop(
  x1 = c(20, 15, 30), n1 = c(100, 80, 120),
  x2 = c(25, 18, 35), n2 = c(100, 80, 120),
  strata = c("A", "B", "C")
)

Version 1.0 methods

Independent groups: Wald, score, Pearson chi-squared, Yates-corrected chi-squared, Fisher exact, Barnard exact, Boschloo exact, Agresti-Caffo, Newcombe/score, Miettinen-Nurminen, Mee, Brown-Li-Jeffreys, and Farrington-Manning.

Additional procedures: risk difference, risk ratio, odds ratio, equivalence, McNemar paired analysis, and stratified Cochran-Mantel-Haenszel analysis.

Statistical validation

Version 1.0 should be validated against published reference examples and independent implementations before CRAN submission. The package deliberately uses established CRAN implementations for several computationally intensive procedures and standardizes their outputs rather than reimplementing copyrighted source code.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("PropTestR")

1.0.0 by Vinodhkumar Obli Rajendran, 2 months ago


https://github.com/vinodhpmd/PropTestR


Report a bug at https://github.com/vinodhpmd/PropTestR/issues


Browse source code at https://github.com/cran/PropTestR


Authors: Vinodhkumar Obli Rajendran [aut, cre] , Keerthi Aaradhana [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports DescTools, ratesci, stats

Suggests testthat, knitr, rmarkdown


See at CRAN