kruskal.wallis {ANSM5} | R Documentation |
Perform Kruskal-Wallis test
Description
kruskal.wallis()
performs the Kruskal-Wallis test and is used in chapters 7 and 12 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
kruskal.wallis(
x,
g,
max.exact.cases = 15,
nsims.mc = 10000,
seed = NULL,
do.asymp = FALSE,
do.exact = TRUE,
do.mc = FALSE
)
Arguments
x |
Numeric vector or factor of same length as g |
g |
Factor of same length as x |
max.exact.cases |
Maximum number of cases allowed for exact calculations (defaults to |
nsims.mc |
Number of Monte Carlo simulations to be performed (defaults to |
seed |
Random number seed to be used for Monte Carlo simulations (defaults to |
do.asymp |
Boolean indicating whether or not to perform asymptotic calculations (defaults to |
do.exact |
Boolean indicating whether or not to perform exact calculations (defaults to |
do.mc |
Boolean indicating whether or not to perform Monte Carlo calculations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 7.1 from "Applied Nonparametric Statistical Methods" (5th edition)
kruskal.wallis(ch7$affordability, ch7$regions, do.exact = FALSE, do.asymp = TRUE)
# Exercise 7.16 from "Applied Nonparametric Statistical Methods" (5th edition)
kruskal.wallis(ch7$affordability, ch7$regions)