Learn R Programming

statpsych (version 2.0.0)

ci.prop.inv: 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.

For more details, see Section 1.19 of Bonett (2021, Volume 3)

Usage

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

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated proportion

  • SE - recovered standard error

  • LL - lower limit of confidence interval

  • UL - upper limit of confidence interval

Arguments

alpha

alpha level for 1-alpha confidence

f

number of participants who have the attribute (fixed)

n

sample size (random)

References

Zou2010statpsych

Bonett2021statpsych

Examples

Run this code
ci.prop.inv(.05, 10, 87)

# Should return:
#  Estimate         SE         LL        UL
# 0.1149425 0.03389574 0.05651668 0.1893855


Run the code above in your browser using DataLab