Learn R Programming

PMCMRplus (version 1.9.12)

power.tukey.test: Power Calculations for Balanced Tukey's Multiple Comparison Test

Description

Compute average per-pair power of Tukey's test for multiple comparison of means.

Usage

power.tukey.test(n, groups, delta, within.var, sig.level = 0.05)

Value

Object of class ‘power.htest’, a list of the arguments (including the computed one) augmented with method and note elements.

Arguments

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)

Details

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 }. $$

See Also

TDist Tukey powerMCTests

Examples

Run this code
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)

if (FALSE) {
powerMCTests(mu = c(rep(0,4), 30), n = 11,
 parms = list(mean = 0,sd = sqrt(333.7)),
 test = "tukeyTest")
}

Run the code above in your browser using DataLab