Learn R Programming

CIfinder (version 2.0.0)

single_prop_ci: Compute the confidence interval for a single proportion based on different methods

Description

Compute the confidence interval for a single proportion based on different methods

Usage

single_prop_ci(
  x,
  n,
  method = "all",
  alternative = "two.sided",
  conf.level = 0.95,
  prior = c(1, 1)
)

Value

Estimated confidence intervals for the probability of success

Arguments

x

number of successes

n

number of trials

method

one of these options "all", "clopper.pearson", "wald", "wislon", "wislon.correct", "agresti", or "beta"

alternative

indicates "two.sided", "one.sided"

conf.level

confidence level

prior

the prior values for "beta" method

Examples

Run this code
single_prop_ci(53, 57, method = "all")

Run the code above in your browser using DataLab