Implementation of the power function for F tests involving one-way and two-way ANOVA using the conservative method based on a single specified difference between any two treatment means, and an standard deviation of the experimental error. The Fpower function has been adapted from the Fpower1 and Fpower2 functions provided in the package daewr.
Fpower(alpha = 0.05, nlev = NULL, nreps = NULL, Delta = NULL, sigma = NULL)
the significance level of the test (default value is alpha = 0.05).
vector containing the number of levels of the factors.
the number of replicates in each combination of factor levels.
the size of a practical difference in two means.
the standard deviation of the experimental error.
a data.frame containing the sample size (nreps), the total number of runs of the experiment (ntotal), the residual's degrees of freedom (df2), and the calculated power associated with the effects in the design.
# one-way ANOVA:
Fpower(alpha=.05, nlev=3, nreps=2:10, Delta=40, sigma=25)
#> nreps ntotal df2 power
#> 1 2 6 3 0.1358291
#> 2 3 9 6 0.2590387
#> 3 4 12 9 0.3843118
#> 4 5 15 12 0.5009510
#> 5 6 18 15 0.6039207
#> 6 7 21 18 0.6913287
#> 7 8 24 21 0.7632712
#> 8 9 27 24 0.8210086
#> 9 10 30 27 0.8663743
# two-way ANOVA:
Fpower(alpha=.05, nlev=c(3, 3), nreps=2:10, Delta=40, sigma=25)
#> nreps ntotal df2 powerA powerB powerAB
#> 1 2 18 9 0.5417938 0.5417938 0.06665484
#> 2 3 27 18 0.8030922 0.8030922 0.08190816
#> 3 4 36 27 0.9225452 0.9225452 0.09738117
#> 4 5 45 36 0.9717814 0.9717814 0.11338134
#> 5 6 54 45 0.9903440 0.9903440 0.12994724
#> 6 7 63 54 0.9968624 0.9968624 0.14705409
#> 7 8 72 63 0.9990238 0.9990238 0.16465631
#> 8 9 81 72 0.9997073 0.9997073 0.18270041
#> 9 10 90 81 0.9999150 0.9999150 0.20112995
# tree-way ANOVA:
Fpower(alpha=.05, nlev=c(3, 3, 3), nreps=2:10, Delta=40, sigma=25)
#> Warning: This function cannot handle designs with more than two factors!!!