power.ladesign: Power of k-sample rank test under Lehmann alternative
Description
Functions to calculate the power of rank tests for animal studies.
Usage
power.ladesign(gsize, odds.ratio, sig.level = 0.05, statistic =
c("Kruskal-Wallis", "Jonckheere-Terpstra"), alternative =
c("two.sided", "one.sided"), nrep=1e+6)
# S3 method for ladesign
print(x,…)
Arguments
gsize
sample size of the k (= length of vector) groups.
odds.ratio
odds ratio parameters for the k-1 groups. The first
group is considered the control.
sig.level
the significance level of the test (default = 0.05)
statistic
the test statistic for the k-group comparison. Is one
of Kruskal-Wallis (default) or Jonckeere-Terpstra.
alternative
one- or two-sided test. Valid only for the
Jonckheere-Terpstra test.
nrep
number of reps (default 1 million) for Monte Carlo.
x
object of class ladesign returned by power.ladesign
...
arguments to be passed on left for S3 method consistency.
Value
returns a list with objects group.size, odds.ratio, statistic,
sig.level and power. The "print" method formats the output.
Details
Although the power for Jonckheere-Terpstra test is calculated for any
set of odds ratio, the test is meant for monotone alternative. Thus
it is preferable to specify odds ratios that are monotonically
increasing with all values larger than 1 or decreasing with all values
smaller than 1.
References
Heller G. (2006). Power calculations for preclinical studies using a
K-sample rank test and the Lehmann alternative hypothesis.
Statistics in Medicine 25, 2543-2553.