R/statpsych1.R
power.mean.Rd
Computes the approximate power of a one-sample t-test for a planned sample size. For a conservatively low power approximation, set the variance planning value to the largest value within its plausible range, and set the effect size to a minimally interesting value.
power.mean(alpha, n, var, es)
alpha level for hypothesis test
planned sample size
planning value of response variable variance
planning value of mean minus null hypothesis value
Returns the approximate power of the test
power.mean(.05, 15, 80.5, 7)
#> Power
#> 0.8021669
# Should return:
# Power
# 0.8021669