ssize.propCI: Sample Size Calculation for Confidence Interval of a...

View source: R/ssizePropCI.R

ssize.propCIR Documentation

Sample Size Calculation for Confidence Interval of a Proportion

Description

Compute the sample size for the two-sided confidence interval of a single proportion.

Usage

ssize.propCI(prop, width, conf.level = 0.95,  method = "wald-cc")

Arguments

prop

expected proportion

width

width of the confidence interval

conf.level

confidence level

method

method used to compute the confidence interval; see Details.

Details

The computation is based on the asymptotic formulas provided in Section 2.5.2 of Fleiss et al. (2003). If method = "wald-cc" a continuity correction is applied.

There are also methods for Jeffreys, Clopper-Pearson, Wilson and the Agresti-Coull interval; see also binomCI.

Value

Object of class "power.htest", a list of the arguments (including the computed one) augmented with method and note elements.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

J.L. Fleiss, B. Levin and M.C. Paik (2003). Statistical Methods for Rates and Proportions. Wiley Series in Probability and Statistics.

W.W. Piegorsch (2004). Sample sizes for improved binomial confidence intervals. Computational Statistics & Data Analysis, 46, 309-316.

M. Thulin (2014). The cost of using exact confidence intervals for a binomial proportion. Electronic Journal of Statistics, 8(1), 817-840.

See Also

power.prop1.test, binomCI

Examples

ssize.propCI(prop = 0.1, width = 0.1)
ssize.propCI(prop = 0.3, width = 0.1)
ssize.propCI(prop = 0.3, width = 0.1, method = "wald")
ssize.propCI(prop = 0.3, width = 0.1, method = "jeffreys")
ssize.propCI(prop = 0.3, width = 0.1, method = "clopper-pearson")
ssize.propCI(prop = 0.3, width = 0.1, method = "wilson")
ssize.propCI(prop = 0.3, width = 0.1, method = "agresti-coull")

MKpower documentation built on April 23, 2023, 1:15 a.m.