size.test.lc.prop.bs {statpsych} | R Documentation |
Sample size for a test of between-subjects proportion linear contrast
Description
Computes the sample size in each group (assuming equal sample sizes) required to test a linear contrast of population proportions with desired power in a between-subjects design. This function requires planning values for all proportions. Set the proportion planning values to .5 for a conservatively large sample size. The planning value for the effect size (linear contrast of proportions) could be set equal to the linear contrast of proportion planning values or it could be set equal to a minimally interesting effect size.
Usage
size.test.lc.prop.bs(alpha, pow, p, es, v)
Arguments
alpha |
alpha level for hypothesis test |
pow |
desired power |
p |
vector of proportion planning values |
es |
planning value of proportion linear contrast |
v |
vector of between-subjects contrast coefficients |
Value
Returns the required sample size for each group
Examples
p <- c(.25, .30, .50, .50)
v <- c(.5, .5, -.5, -.5)
size.test.lc.prop.bs(.05, .9, p, .15, v)
# Should return:
# Sample size per group
# 105
[Package statpsych version 1.6.0 Index]