Density, distribution function, quantile function, random generator and summary function for the Kruskal-Wallis test.
dKruskalWallis(x, c, N, U, log=FALSE)
pKruskalWallis(q, c, N, U, lower.tail=TRUE, log.p=FALSE)
qKruskalWallis(p, c, N, U, lower.tail=TRUE, log.p=FALSE)
rKruskalWallis(n, c, N, U)
sKruskalWallis(c, N, U)
The output values conform to the output from other such functions in R. dKruskalWallis()
gives the density, pKruskalWallis()
the distribution function and qKruskalWallis()
its inverse. rKruskalWallis()
generates random numbers. sKruskalWallis()
produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis.
vector of non-negative quantities
vector of probabilities
number of values to generate. If n is a vector, length(n) values will be generated
vector number of treatments
vector total number of observations
vector sum of reciprocals of the number of the c sample sizes
logical vector; if TRUE, probabilities p are given as log(p)
logical vector; if TRUE (default), probabilities are
Bob Wheeler
This is a one-way layout with, perhaps, unequal sample sizes for each treatment. There are c treatments with sample sizes
Let
This is asymptotically equivalent to a chi-squared variable with c-1 degrees of freedom.
The original paper is Kruskal and Wallis (1952) with errata appearing in Kruskal and Wallis (1953). No attempt is made to calculate exact values, rather an incomplete beta approximation is used following Wallace (1959).
Kruskal, W.H. and Wallis, W.A. (1952) Use of ranks in one-criterion variance analysis. Jour. Am. Stat. Assoc. 47. 583-634
Kruskal, W.H. and Wallis, W.A. (1953) Errata to Use of ranks in one-criterion variance analysis. Jour. Am. Stat. Assoc. 48. 907-911.
Wallace, D.L. (1959). Simplified beta-approximations to the Kruskal-Wallis H test. Jour. Am. Stat. Assoc. 54. 225-230.
# Assuming three treatments, each with a sample size of 5.
pKruskalWallis(1, 3, 15, 0.6)
pKruskalWallis(c(.1,1.5,5.7), 3, 15, 0.6) ## approximately 5% 50% and 95%
sKruskalWallis(3, 15, 0.6)
plot(function(x)dKruskalWallis(x, 3, 15, 0.6),0.5,8)
Run the code above in your browser using DataLab