binomTest: Confidence Intervals for Binomial Proportions

View source: R/binomTest.R

binomTestR Documentation

Confidence Intervals for Binomial Proportions

Description

Generates lower and upper confidence interval limits for a binomial proportion using different types of confidence intervals.

Usage

 binomTest(n, x,
           alpha = 0.05,
           intervalType = "Clopper-Pearson")

Arguments

n

sample size

x

number of successes

alpha

significance level for confidence interval

intervalType

type of confidence interval used; either "Clopper-Pearson", "Wald", "Wilson-Score", "Jeffreys", "Agresti-Coull", "Arcsine", or "Blaker"

Details

Generates a lower and upper confidence interval limit for a binomial proportion using

  • various types of confidence intervals,

  • various sample sizes, and

  • various numbers of successes.

When the binomTest function is called, it returns a two-element vector in which

  • the first element is the lower bound of the confidence interval, and

  • the second element is the upper bound of the confidence interval.

This confidence interval is constructed by calculating lower and upper bounds associated with the confidence interval procedure specified by the intervalType argument. Lower bounds that are negative are set to 0 and upper bounds that are greater than 1 are set to 1.

Author(s)

Hayeon Park (hpark031@gmail.com), Larry Leemis (leemis@math.wm.edu)

See Also

dbinom

Examples

  binomTest(10, 6)
  binomTest(100, 30, intervalType = "Agresti-Coull")

conf documentation built on Oct. 1, 2023, 1:07 a.m.