Learn R Programming

statpsych (version 1.7.0)

ci.prop.fpc: Confidence interval for a proportion with a finite population correction

Description

Computes an adjusted Wald interval for a population proportion with a finite population correction (fpc). This confidence interval is useful when the sample size is not a small fraction of the population size.

Usage

ci.prop.fpc(alpha, f, n, N)

Value

Returns a 1-row matrix. The columns are:

  • Estimate - adjusted estimate of proportion

  • SE - adjusted standard error with fpc

  • LL - lower limit of the confidence interval with fpc

  • UL - upper limit of the confidence interval with fpc

Arguments

alpha

alpha level for 1-alpha confidence

f

number of participants who have the attribute

n

sample size

N

population size

Examples

Run this code
ci.prop.fpc(.05, 12, 100, 400)

# Should return:
#   Estimate         SE         LL        UL
#  0.1346154  0.0290208 0.07773565 0.1914951


Run the code above in your browser using DataLab