Learn R Programming

ANSM5 (version 1.1.1)

kruskal.wallis.vdW: Perform Kruskal-Wallis test with van der Waerden scores

Description

kruskal.wallis.vdW() performs the Kruskal-Wallis test with van der Waerden scores and is used in chapter 7 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

kruskal.wallis.vdW(
  x,
  g,
  max.exact.cases = 15,
  nsims.mc = 10000,
  seed = NULL,
  do.asymp = FALSE,
  do.exact = TRUE
)

Value

An ANSMtest object with the results from applying the function

Arguments

x

Numeric vector 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 15)

nsims.mc

Number of Monte Carlo simulations to be performed (defaults to 10000)

seed

Random number seed to be used for Monte Carlo simulations (defaults to NULL)

do.asymp

Boolean indicating whether or not to perform asymptotic calculations (defaults to FALSE)

do.exact

Boolean indicating whether or not to perform exact calculations (defaults to TRUE)

Examples

Run this code
# Example 7.2 from "Applied Nonparametric Statistical Methods" (5th edition)
kruskal.wallis.vdW(ch7$age, ch7$positions)
kruskal.wallis.vdW(ch7$age, ch7$positions, do.exact = FALSE, do.asymp = TRUE)

Run the code above in your browser using DataLab