
Last chance! 50% off unlimited learning
Sale ends in
Calculate the simple random sample size for estimating a proportion using the log-odds transformation.
nLogOdds(moe.sw, e, alpha=0.05, pU, N=Inf)
numeric sample size
switch for setting desired margin of error
(1 = CI half-width on the proportion;
2 = CI half-width on a proportion divided by pU
)
desired margin of error
1 - (confidence level)
population proportion
number of units in finite population
Richard Valliant, Jill A. Dever, Frauke Kreuter
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
).
Valliant, R., Dever, J., Kreuter, F. (2018, chap. 3). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. New York: Springer.
nProp
, nPropMoe
, nWilson
, nCont
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)
Run the code above in your browser using DataLab