R/statpsych3.R
size.ci.prop2.Rd
Computes the sample size in each group (assuming equal sample sizes) required to estimate a difference of population proportions with desired confidence interval precision in a 2-group design. Set the proportion planning values to .5 for a conservatively large sample size.
size.ci.prop2(alpha, p1, p2, w)
alpha level for 1-alpha confidence
planning value of proportion for group 1
planning value of proportion for group 2
desired confidence interval width
Returns the required sample size for each group
size.ci.prop2(.05, .4, .2, .15)
#> Sample size per group
#> 274
# Should return:
# Sample size per group
# 274