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

Compute a simple random sample size using a margin of error specified as the half-width of a normal approximation confidence interval or the half-width relative to the population mean.

1 |

`moe.sw` |
switch for setting desired margin of error (1 = CI half-width on the mean;
2 = CI half-width on the mean divided by |

`e` |
desired margin of error; either |

`alpha` |
1 - (confidence level) |

`CVpop` |
unit (population) coefficient of variation |

`S2` |
population variance of the target variable |

`ybarU` |
population mean of target variable |

`N` |
number of units in finite population |

If `moe.sw`

=1, then `S2`

must be provided. If `moe.sw`

=2, then either (i) `CVpop`

or (ii) `S2`

and `ybarU`

must be provided.

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

`nCont`

, `nLogOdds`

, `nProp`

, `nPropMoe`

, `nWilson`

1 2 3 4 5 |

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.