nLogOdds: Calculate simple random sample size for estimating a...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/nLogOdds.R

Description

Calculate the simple random sample size for estimating a proportion using the log-odds transformation.

Usage

1
    nLogOdds(moe.sw, e, alpha=0.05, pU, N=Inf)

Arguments

moe.sw

switch for setting desired margin of error (1 = CI half-width on the proportion; 2 = CI half-width on a proportion divided by pU)

e

desired margin of error

alpha

1 - (confidence level)

pU

population proportion

N

number of units in finite population

Details

The function accepts five parameters, which are the same ones as accepted by nPropMoe. The desired margin of error can be specified as the CI half-width on the proportion (moe.sw=1) or as the CI half-width as a proportion of the population value pU (moe.sw=2).

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

nProp, nPropMoe, nWilson, nCont

Examples

1
2
nLogOdds(moe.sw=1, e=0.05, alpha=0.05, pU=0.2, N=Inf)
nLogOdds(moe.sw=2, e=0.05, alpha=0.05, pU=0.2, N=Inf)


PracTools documentation built on May 19, 2017, 2:18 p.m.
Search within the PracTools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.