Power calculation for interaction effect in 2x2 two-way ANOVA given effect sizes.
powerInteract2by2(n, tauBetaSigma, alpha = 0.05, nTests = 1, verbose = FALSE)
integer. Number of subjects per group.
Effect sizes tauBetaSigma=
family-wise type I error rate.
integer. For high-throughput omics study,
we perform two-way ANOVA for each of 'nTests' probes.
We use Bonferroni correction to control for family-wise type I error rate.
That is, for each probe, type I error rate would be alpha/nTests
.
logical. Indicating if intermediate results should be printed out.
A list with 5 elements:
the power of the two-way ANOVA test
the first degree of freedom of the F test statistic (df1=(a-1)(b-1)
)
the second degree of freedom of the F test statistic (df1=a*b(n-1)
)
the rejection region boundary
the non-centrality parameter
We assume the following model:
The group means are
The null hypothesis
The F test statistic is ncp
is the
non-centrality parameter of the F test statistic:
For the scenario
The power for testing the null hypothesis
Chow SC, Shao J, and Wang H. Sample size calculations in clinical research. 2nd edition. Chapman & Hall/CRC. 2008
Montgomery DC. Design and Analysis of Experiments. 8th edition. John Wiley & Sons. Inc.
# NOT RUN {
n = 25
tauBetaSigma = 0.3
# power = 0.8437275
res2 = powerInteract2by2(n = n, tauBetaSigma = tauBetaSigma,
alpha = 0.05, nTests = 1, verbose = TRUE)
# }
Run the code above in your browser using DataLab