R/statpsych1.R
size.test.lc.mean.bs.Rd
Computes the sample size in each group (assuming equal sample sizes) required to test a linear contrast of population means with desired power in a between-subjects design. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.
size.test.lc.mean.bs(alpha, pow, var, es, v)
alpha level for hypothesis test
desired power
planning value of average within-group variance
planning value of linear contrast of means
vector of between-subjects contrast coefficients
Returns the required sample size for each group
v <- c(1, -1, -1, 1)
size.test.lc.mean.bs(.05, .90, 27.5, 5, v)
#> Sample size per group
#> 47
# Should return:
# Sample size per group
# 47