Learn R Programming

PracTools (version 1.2.5)

nProp: Compute simple random sample size for estimating a proportion

Description

Compute the simple random sample size for estimating a proportion based on different precision requirements.

Usage

nProp(CV0 = NULL, V0 = NULL, pU = NULL, N = Inf)

Arguments

CV0

target value of coefficient of variation of the estimated proportion

V0

target value of variance of the estimated proportion

pU

population proportion

N

number of units in finite population

Value

numeric sample size

Details

The precision requirement of \(p_s\) can be set based on either a target coefficient of variation, \(CV_0\), or a target variance, \(V_0\). In either case, a value of \(p_U\) must be supplied.

References

Valliant, R., Dever, J., Kreuter, F. (2018, chap. 3). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. New York: Springer.

See Also

nCont, nLogOdds, nPropMoe, nWilson

Examples

Run this code
# NOT RUN {
# srs sample size so that CV of estimated proportion is 0.05
# assuming the population is large and pU=0.01
# Both examples below are equivalent
nProp(V0=0.0005^2, N=Inf, pU=0.01) #or
nProp(CV0=0.05, N=Inf, pU=0.01)

# srswor sample size so that half-width of 2-sided 95% CI is 0.005
nProp(V0=(0.005/1.96)^2, N=Inf, pU=0.01)
# }

Run the code above in your browser using DataLab