ci.prop: Confidence intervals for a proportion

View source: R/statpsych3.R

ci.propR Documentation

Confidence intervals for a proportion

Description

Computes adjusted Wald and Wilson confidence intervals for a population proportion. The Wilson confidence interval uses a continuity correction.

ci.prop1 is deprecated and will soon be removed from statpsych; please switch to ci.prop

Usage

ci.prop(alpha, f, n)

ci.prop1(alpha, f, n)

Arguments

alpha

alpha level for 1-alpha confidence

f

number of participants who have the attribute

n

sample size

Value

Returns a 2-row matrix. The columns of row 1 are:

  • Estimate - adjusted estimate of proportion

  • SE - adjusted standard error

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

The columns of row 2 are:

  • Estimate - ML estimate of proportion

  • SE - standard error

  • LL - lower limit of the Wilson confidence interval

  • UL - upper limit of the Wilson confidence interval

References

\insertRef

Agresti1998statpsych

Examples

ci.prop(.05, 12, 100)

# Should return:
#                  Estimate         SE         LL        UL
# Adjusted Wald   0.1346154 0.03346842 0.06901848 0.2002123
# Wilson with cc  0.1200000 0.03249615 0.06625153 0.2039772



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.