Performs power simulation for one-factorial all-pairs and Many-To-One comparison tests.
powerMCTests(mu, n = 10, errfn = c("Normal", "Lognormal", "Exponential",
"Chisquare", "TDist", "Cauchy", "Weibull"), parms = list(mean = 0, sd = 1),
test = c("kwManyOneConoverTest", "kwManyOneDunnTest", "kwManyOneNdwTest",
"vanWaerdenManyOneTest", "normalScoresManyOneTest", "dunnettTest",
"tamhaneDunnettTest", "ManyOneUTest", "kwAllPairsNemenyiTest",
"kwAllPairsDunnTest", "kwAllPairsConoverTest", "normalScoresAllPairsTest",
"vanWaerdenAllPairsTest", "dscfAllPairsTest", "gamesHowellTest", "lsdTest",
"scheffeTest", "tamhaneT2Test", "tukeyTest", "dunnettT3Test",
"pairwise.t.test", "pairwise.wilcox.test", "adManyOneTest", "adAllPairsTest",
"bwsManyOneTest", "bwsAllPairsTest"), alternative = c("two.sided",
"greater", "less"), p.adjust.method = c("single-step", p.adjust.methods),
alpha = 0.05, FWER = TRUE, replicates = 1000)
numeric vector of group means.
number of replicates per group. If n
is a scalar, then
a balanced design is assumed. Otherwise, n
must be a vector of same
length as mu
.
the error function. Defaults to "Normal"
.
a list that denotes the arguments for the error function.
Defaults to list(mean=0, sd=1)
.
the multiple comparison test for which the power analysis is
to be performed. Defaults to "kwManyOneConoverTest"
.
the alternative hypothesis. Defaults to "two.sided"
,
ignored if the selected error function does not use this argument.
method for adjusting p values (see p.adjust
).
the nominal level of Type I Error.
logical, indicates whether the family-wise error should be computed.
Defaults to TRUE
.
the number of Monte Carlo replicates or runs. Defaults to 1000
.
An object with class powerPMCMR
.
The linear model of a one-way ANOVA can be written as:
For each Monte Carlo run, the function simulates
# NOT RUN {
mu <- c(0, 0, 1, 2)
n <- c(5, 4, 5, 5)
set.seed(100)
powerMCTests(mu, n, errfn="Normal",
parms=list(mean=0, sd=1),
test="dunnettTest", replicates=1E4)
powerMCTests(mu, n, errfn="Normal",
parms=list(mean=0, sd=1),
test="kwManyOneDunnTest", p.adjust.method = "bonferroni",
replicates=1E4)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab