size.test.prop2 {statpsych} | R Documentation |
Sample size for a test of a 2-group proportion difference
Description
Computes the sample size in each group required to test a difference in population proportions with desired power in a 2-group design. This function requires planning values for both proportions. Set the proportion planning values to .5 for a conservatively large sample size. The planning value for the effect size (proportion difference) could be set equal to the difference of the two proportion planning values or it could be set equal to a minimally interesting effect size.
Usage
size.test.prop2(alpha, pow, p1, p2, es)
Arguments
alpha |
alpha level for hypothesis test |
pow |
desired power |
p1 |
planning value of proportion for group 1 |
p2 |
planning value of proportion for group 2 |
es |
planning value of proportion difference |
Value
Returns the required sample size for eachr group
Examples
size.test.prop2(.05, .8, .2, .4, .2)
# Should return:
# Sample size per group
# 79
[Package statpsych version 1.5.0 Index]