size.test.prop1 | R Documentation |
Computes the sample size required to test a single population proportion with desired power in a 1-group design. Set the proportion planning value to .5 for a conservatively large sample size. The value of the effect size (expected population proportion minus hypothesized value) need not be based on the proportion planning value.
size.test.prop1(alpha, pow, p, es)
alpha |
alpha level for hypothesis test |
pow |
desired power |
p |
planning value of proportion |
es |
planning value of proportion minus null hypothesis value |
Returns the required sample size
size.test.prop1(.05, .9, .5, .2)
# Should return:
# Sample size
# [1,] 66
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.