size.test.prop1 {statpsych} | R Documentation |
Sample size for a test of a single proportion
Description
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.
Usage
size.test.prop1(alpha, pow, p, es)
Arguments
alpha |
alpha level for hypothesis test |
pow |
desired power |
p |
planning value of proportion |
es |
planning value of proportion minus null hypothesis value |
Value
Returns the required sample size
Examples
size.test.prop1(.05, .9, .5, .2)
# Should return:
# Sample size
# 66
[Package statpsych version 1.5.0 Index]