R/statpsych1.R
power.mean2.Rd
Computes the approximate power of a two-sample t-test for planned sample sizes. For a conservatively low power approximation, set the variance planning values to the largest values within their plausible ranges, and set the effect size to a minimally interesting value. The within-group variances can be unequal across groups and a Satterthwaite degree of freedom adjustment is used to improve the accuracy of the power approximation.
power.mean2(alpha, n1, n2, var1, var2, es)
alpha level for hypothesis test
planned sample size for group 1
planned sample size for group 2
planning value of within-group variance for group 1
planning value of within-group variance for group 2
planning value of mean difference
Returns the approximate power of the test
power.mean2(.05, 25, 25, 5.0, 6.0, 2)
#> Power
#> 0.8398417
# Should return:
# Power
# 0.8398417