View source: R/power.tukey.test.R
power.tukey.test | R Documentation |
Compute average per-pair power of Tukey's test for multiple comparison of means.
power.tukey.test(n, groups, delta, within.var, sig.level = 0.05)
n |
number of observations (per group) |
groups |
number of groups |
delta |
true difference in means |
within.var |
within group variance |
sig.level |
significance level (Type I error probability) |
The function has implemented the following Eq. to estimate average per-pair power for two-sided tests:
1 - \beta = 1 - t(q_{\alpha v k}/\sqrt{2}, v, \mathrm{ncp}) +
t(-q_{\alpha v k}/\sqrt{2}, v, \mathrm{ncp}),
with q_{\alpha v k}
the upper \alpha
quantile of
the studentised range distribution, with v = k (n - 1)
degree of freedom and k
the number of groups;
and t(. ~\mathrm{ncp})
the probability function of the non-central student t-distribution
with non-centrality parameter
\mathrm{ncp} = |\Delta| / \sqrt{s_{\mathrm{in}}^2 ~ 2 / n }.
Object of class ‘power.htest
’,
a list of the arguments
(including the computed one) augmented with
method
and note
elements.
The Eqs. were taken from Lecture 5, Determining Sample Size, Statistics 514, Fall 2015, Purdue University, IN, USA.
TDist
Tukey
powerMCTests
power.tukey.test(n = 11, groups = 5, delta = 30,
within.var = 333.7)
## compare with t-test, Bonferroni-correction
power.t.test(n = 11, delta = 30, sd = sqrt(333.7),
sig.level = 0.05 / 10)
## Not run:
powerMCTests(mu = c(rep(0,4), 30), n = 11,
parms = list(mean = 0,sd = sqrt(333.7)),
test = "tukeyTest")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.