Compute average per-pair power of Dunnetts's multiple comparison test with one control.
power.dunnett.test(n, groups, delta, within.var, sig.level = 0.05)
Object of class ‘power.htest
’,
a list of the arguments
(including the computed one) augmented with
method
and note
elements.
Number of observations (per group)
Number of groups (including control)
true difference in means
Within group variance
Significance level (Type I error probability)
The function has implemented the following Eq. to estimate average per-pair power for two-sided tests:
with
The non-centrality parameter for the non-central student t-distribution is
set.seed(113)
power.dunnett.test(n = 9, groups = 5, delta = 30,
within.var = 333.7)
## compare with t-test, bonferroni corrected
power.t.test(n = 9, delta = 30, sd = sqrt(333.7),
sig.level = 0.05 / 4)
if (FALSE) {
## asymptotic Monte-Carlo power analysis
set.seed(113)
powerMCTests(mu = c(rep(0,4), 30), n = 9,
parms = list(mean = 0, sd = sqrt(333.7)),
test = "dunnettTest", alternative = "two.sided")
}
Run the code above in your browser using DataLab