ci.prop.inv: Confidence interval for a proportion using inverse sampling

View source: R/statpsych3.R

ci.prop.invR Documentation

Confidence interval for a proportion using inverse sampling

Description

Computes an exact confidence interval for a population proportion when inverse sampling has been used. An approximate standard error is recovered from the confidence interval. With inverse sampling, the number of participants who have the attribute (f) is predetermined and sampling continues until f attains its prespecified value. With inverse sampling, the sample size (n) will not be known in advance.

Usage

ci.prop.inv(alpha, f, n)

Arguments

alpha

alpha level for 1-alpha confidence

f

number of participants who have the attribute (fixed)

n

sample size (random)

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimate of proportion

  • SE - recovered standard error

  • LL - lower limit of confidence interval

  • UL - upper limit of confidence interval

References

\insertRef

Zou2010statpsych

Examples

ci.prop.inv(.05, 5, 67)

# Should return:
#   Estimate         SE         LL        UL
# 0.07462687 0.03145284 0.02467471 0.1479676



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