kwsamplesize {MultNonParam} | R Documentation |
kwsamplesize
approximates power for the Kruskal-Wallis test,
using a chi-square approximation under the null, and a non-central chi-square approximation under the alternative. The noncentrality parameter is calculated using alternative means and the null variance structure.
kwsamplesize(shifts, distname = c("normal", "logistic"), targetpower = 0.8, proportions = rep(1, length(shifts))/length(shifts), level = 0.05, taylor = FALSE)
shifts |
The offsets for the various populations, under the alternative hypothesis. |
distname |
The distribution of the underlying observations; normal and logistic are currently supported. |
targetpower |
The distribution of the underlying observations; normal and logistic are currently supported. |
proportions |
The proportions in each group. |
level |
The test level. |
taylor |
Logical flag forcing the approximation of exceedence probabilities using the first derivative at zero. |
The standard noncentral chi-square power formula, or Monte Carlo, is used.
A list with components power, giving the power approximation, ncp, giving the noncentrality parameter, cv, giving the critical value, probs, giving the intermediate output from pairwiseprobability, and expect, the quantities summed before squaring in the noncentrality parameter.
kwpower(rep(10,3),c(0,1,2),"normal")