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)

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)
#>      Sample size
#> [1,]          66

# Should return:
#      Sample size
# [1,]          66