ExactCIdiff: An R package for computing exact confidence intervals for the difference of two proportions

Guogen Shan, Weizhen Wang

Research output: Contribution to journalArticlepeer-review

Abstract

<p> Comparing two proportions through the difference is a basic problem in statistics and has applications in many &filig;elds. More than twenty con&filig;dence intervals (Newcombe, 1998a,b) have been proposed. Most of them are approximate intervals with an asymptotic in&filig;mum coverage probability much less than the nominal level. In addition, large sample may be costly in practice. So exact optimal con&filig;dence intervals become critical for drawing valid statistical inference with accuracy and precision. Recently, Wang (2010, 2012) derived the exact smallest (optimal) one-sided 1 &ndash; &alpha; confidence intervals for the difference of two paired or independent proportions. His intervals, however, are computer-intensive by nature. In this article, we provide an R package ExactCIdiff to implement the intervals when the sample size is not large. This would be the &filig;rst available package in R to calculate the exact con&filig;dence intervals for the difference of proportions. Exact two-sided 1 &ndash; &alpha; interval can be easily obtained by taking the intersection of the lower and upper one-sided 1 &ndash; &alpha;/2 intervals. Readers may jump to Examples 1 and 2 to obtain these intervals.</p>
Original languageAmerican English
Pages (from-to)62-70
Number of pages9
JournalR Journal
Volume5
Issue number2
DOIs
StatePublished - Dec 2013

ASJC Scopus Subject Areas

  • Statistics and Probability
  • Numerical Analysis
  • Statistics, Probability and Uncertainty

Keywords

  • Binary system (Mathematics)
  • Mathematical statistics
  • Probabilities
  • Statistics

Disciplines

  • Clinical Trials
  • Medicine and Health Sciences
  • Statistical Methodology
  • Vital and Health Statistics

Cite this