Computes the sample size required to test a single population mean with desired power in a 1-group design. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.
size.test.mean(alpha, pow, var, es)
alpha level for hypothesis test
desired power
planning value of response variable variance
planning value of mean minus null hypothesis value
Returns the required sample size
size.test.mean(.05, .9, 80.5, 7)
#> Sample size
#> 20
# Should return:
# Sample size
# 20