# 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

1 |

### 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 |

### 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.

### Value

numeric sample size

### Author(s)

Richard Valliant, Jill A. Dever, Frauke Kreuter

### References

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

### See Also

`nCont`

, `nLogOdds`

, `nPropMoe`

, `nWilson`

### Examples

1 2 3 4 5 6 7 8 | ```
# 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)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.