Software to Simplify Statistical Practice ...

Kruskal-Wallis Rank Sum Test

 

Data

The data are from a comparison of four investment firms. The observations represent percentage of growth during a three month period for recommended funds.

Source: http://www.itl.nist.gov/div898/handbook/prc/section4/prc41.htm

 

 

Analysis

  1. Open the DataBook growth.vstz
  2. Choose the menu Data
  3. Choose the menu Analyze and the command Kruskal-Wallis
  4. In Variable, select investment
  5. In Grouping Variable, select firms
  6. Click OK

 

 

Output

By default, R code is printed after parsing and before evaluation.
You can avoid this in File / Option / Advanced menu.

DataSheet is converted to DataFrame, in the form DataBook.DataSheet

> tapply(growth.kw$investment, growth.kw$firms, median, na.rm = TRUE)

  A   B   C   D
4.1 2.8 2.1 3.7

 

> kruskal.test(formula = investment ~ firms, data = growth.kw)

 

       Kruskal-Wallis rank sum test

 

data:  investment by firms
Kruskal-Wallis chi-squared = 13.6904, df = 3, p-value = 0.003358