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

Calculate a simple random sample size for estimating a proportion using the Wilson method.

1 | ```
nWilson(moe.sw, alpha = 0.05, pU, e)
``` |

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

`alpha` |
1 - (confidence level) |

`pU` |
population proportion |

`e` |
desired margin of error; either the value of CI half-width or the value of the half-width divided by |

Calculate a simple random sample size using the Wilson (1927) method. A margin of error
can be set as the CI half-width on the proportion (`moe.sw=1`

) or as the CI
half-width as a proportion of the population value *p_U* (`moe.sw=2`

).

`n.sam` |
numeric sample size |

`"CI lower limit"` |
lower limit of Wilson confidence interval with computed sample size |

`"CI upper limit"` |
upper limit of Wilson confidence interval with computed sample size |

`"length of CI"` |
length of Wilson confidence interval with computed sample size |

Richard Valliant, Jill A. Dever, Frauke Kreuter

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

Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. *Journal of the American Statistical Association*, 22, 209-212.

`nCont`

, `nLogOdds`

, `nProp`

, `nPropMoe`

1 2 3 | ```
# srs sample size using Wilson method so that half-width of a 95% CI
# is 0.01. Population proportion is 0.04
nWilson(moe.sw = 1, pU = 0.04, e = 0.01)
``` |

PracTools documentation built on Oct. 21, 2018, 9:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.