power.ladesign | R Documentation |
Functions to calculate the power of rank tests for animal studies.
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 class 'ladesign'
print(x,...)
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. |
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.
returns a list with objects group.size, odds.ratio, statistic, sig.level and power. The "print" method formats the output.
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.
power.ladesign(c(9,7), 4, statistic="K")
power.ladesign(c(9,7,9), c(2,4), statistic="J")
power.ladesign(c(9,7,9), c(2,4), statistic="J", alt="o")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.