Description Usage Arguments Value References Examples
Calculate sample size (per group) needed to estimate a difference in proportions within a given margin of error. This function is derived from the classic approximate confidence interval formula for the difference in proportions (Hogg & Tanis, p. 383). The estimated sample size should be treated as a rough estimate.
1 | dpropSampleSize(moe, p1 = 0.5, p2 = 0.5, conf = 0.95)
|
moe |
margin of error expressed as proportion (0 < moe < 1) |
p1 |
estimated proportion in group 1 (default = 0.5) |
p2 |
estimated proportion in group 2 (default = 0.5) |
conf |
confidence level associated with margin of error (default = 0.95) |
Estimated sample size for each group.
Hogg, R. V. and Tanis, E. A. (2006), Probability and Statistical Inference 7e, Pearson, New Jersey.
1 2 3 | ## Approximate sample size needed to estimate the difference in proportions between two
## binomial populations within 0.02, one with p = 0.11 and the other with p = 0.09.
dpropSampleSize(moe = 0.02, p1 = 0.11, p2 = 0.09)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.