Understanding the Kruskal-Wallis Test: An Example of Vitamin C and Cold Symptoms, Lecture notes of Statistics

The Kruskal-Wallis test, a non-parametric statistical method used to evaluate differences in population medians across multiple groups. an example using data from a study on Vitamin C and cold symptoms, as well as instructions for conducting the test using SPSS. Assumptions, effect size statistics, and research questions are also discussed.

Typology: Lecture notes

2021/2022

Uploaded on 09/27/2022

nath
nath 🇬🇧

4.9

(8)

257 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EPS
625
I
NTERMEDIATE
S
TATISTICS
K
RUSKAL
-W
ALLIS
T
EST
The Kruskal-Wallis test evaluates whether the population medians on a dependent variable are
the same across all levels of a factor. To conduct the Kruskal-Wallis test, using the K
independent samples procedure, cases must have scores on an independent or grouping variable
and on a dependent variable. The independent or grouping variable divides individuals into two
or more groups, and the dependent variable assesses individuals on at least an ordinal scale.
If the independent variable has only two levels, no additional significance tests need to be
conducted beyond the Kruskal-Wallis test. However, if a factor has more than two levels and the
overall test is significant, follow-up tests are usually conducted. These follow-up tests most
frequently involve comparisons between pairs of group medians. For the Kruskal-Wallis, we
could use the Mann-Whitney U test to examine unique pairs.
U
NDERSTANDING THE
K
RUSKAL
-W
ALLIS
T
EST
To help understand how the Kruskal-Wallis test evaluates differences in medians among groups,
we will look at an example provided by Green and Salkind (2008). First, we must describe what
data are being analyzed in this test. We will be using an example dealing with Vitamin C to
demonstrate the Kruskal-Wallis test (Lesson 43 from Green & Salkind).
pf3
pf4
pf5
pf8

Partial preview of the text

Download Understanding the Kruskal-Wallis Test: An Example of Vitamin C and Cold Symptoms and more Lecture notes Statistics in PDF only on Docsity!

EPS 625 – INTERMEDIATE STATISTICS

KRUSKAL-WALLIS TEST

The Kruskal-Wallis test evaluates whether the population medians on a dependent variable are the same across all levels of a factor. To conduct the Kruskal-Wallis test, using the K independent samples procedure, cases must have scores on an independent or grouping variable and on a dependent variable. The independent or grouping variable divides individuals into two or more groups, and the dependent variable assesses individuals on at least an ordinal scale.

If the independent variable has only two levels, no additional significance tests need to be conducted beyond the Kruskal-Wallis test. However, if a factor has more than two levels and the overall test is significant, follow-up tests are usually conducted. These follow-up tests most frequently involve comparisons between pairs of group medians. For the Kruskal-Wallis, we could use the Mann-Whitney U test to examine unique pairs.

UNDERSTANDING THE KRUSKAL-WALLIS TEST

To help understand how the Kruskal-Wallis test evaluates differences in medians among groups, we will look at an example provided by Green and Salkind (2008). First, we must describe what data are being analyzed in this test. We will be using an example dealing with Vitamin C to demonstrate the Kruskal-Wallis test (Lesson 43 from Green & Salkind).

KRUSKAL-WALLIS TEST

The data set includes scores on the dependent variable (difference in number of colds from one year to the next) and their rank order, disregarding levels of the factor (Vitamin C group), from lowest to highest for the Kruskal-Wallis test. With the Kruskal-Wallis test, a chi-square statistic is used to evaluate differences in mean ranks to assess the null hypothesis that the medians are equal across the groups.

ASSUMPTIONS UNDERLYING A MANN-WHITNEY U TEST

Because the analysis for the Kruskal-Wallis test is conducted on ranked scores, the population distributions for the test variable (the scores that the ranks are based on) do not have to be of any particular form (e.g., normal). However, these distributions should be continuous and have identical form.

Assumption 1: The continuous distributions for the test variable are exactly the same (except their medians) for the different populations.

Assumption 2: The cases represent random samples from the populations, and the scores on the test variable are independent of each other.

Assumption 3: The chi-square statistic for the Kruskal-Wallis test is only approximate and becomes more accurate with larger sample sizes.

The p value for the chi-square approximation test is fairly accurate if the number of cases is greater than or equal to 30.

EFFECT SIZE STATISTICS FOR THE MANN-WHITNEY U TEST

SPSS does not report an effect size index for the Kruskal-Wallis test. However, simple indices can be computed to communicate the size of the effect.

For the Kruskal-Wallis test, the median and the mean rank for each of the groups can be reported. Another possibility for the Kruskal-Wallis test is to compute an index that is usually associated with a one-way ANOVA, such as eta square (η^2 ), except η^2 in this case would be computed on the ranked data. To do so, transform the scores to ranks, conduct an ANOVA, and compute an eta square on the ranked scores. Eta square can also be computed directly from the reported chi-square value for the Kruskal-Wallis test with the use of the following equation:

2 2 −

N

Where N is the total number of cases

THE DATA SET

The data set that we will look at for this example is from Lesson 43 from Green and Salkind’s (2008) Using SPSS for Windows and Macintosh: Analyzing and Understanding Data (5th^ ed.). The data set represents data from an example looking at Vitamin C.

KRUSKAL-WALLIS TEST

 Click OK

  • You are now ready to analyze the output data…

SPSS OUTPUT

NPar Tests

Descriptive Statistics

30 -.20 5.182 -9 12 30 2.00 .830 1 3

Diff_Score Vitamin C Treatment

N Mean Std. Deviation Minimum Maximum

Kruskal-Wallis Test

Ranks

10 21. 10 12. 10 12. 30

Vitamin C Treatment Placebo Low Dose High Dose Total

Diff_Score

N Mean Rank

Test Statisticsa,b

2 .

Chi-Square df Asymp. Sig.

Diff_Score

a. Kruskal Wallis Test b. Grouping Variable: Vitamin C Treatment

The results of the analysis indicates that there is a significant difference in the medians, χ^2 (2, N =

  1. = 6.92, p = .03. Because the overall test is significant, pairwise comparisons among the three groups should be completed.

CONDUCTING PAIRWISE COMPARISONS AFTER OBTAINING A SIGNIFICANT

KRUSKAL-WALLIS TEST IN SPSS

The pariwise comparisons will be conducted using the Mann-Whitney U test, which yields identical results with the Kruskal-Wallis test for two independent samples. For each pairwise comparison, the values in the Define Groups dialog box will be changed to match the comparison of interest (e.g., 1 vs. 2, 1 vs. 3, etc.). Don’t forget to protect for Type I Error, by adjusting the a priori alpha level divided by the number of comparisons (Bonferroni adjustment).

KRUSKAL-WALLIS TEST

To conduct the Mann-Whitney U test in SPSS, use the following steps:

  • Click Analyze , click (mouse over) Nonparametric Tests , and then click 2 Independent-Samples o You should now be in the Two-Independent Samples Tests dialog box  Click on your ( Test Variable ), and click  to move it to the Test Variable List: box  Click on your ( Grouping Variable ), and click  to move it to the Grouping Variable: box  Click Define Groups - Type 1 in the Group 1 box to indicate that Group 1 is the first level of your grouping variable. - Type 2 in the Group 2 box indicating that Group 2 is the second level of your grouping variable. - Click Continue  Click Options - Under Statistics o Select [√√√√] Descriptive - Click Continue  Be sure Mann-Whitney U is checked in the Test Type area.  Click OK
  • You are now ready to analyze the output data…

To perform the subsequent comparisons, repeat the above steps, except indicate in the Define Groups dialog box the groups of interest. For this example, use Groups 1 and 3 for the second comparison and Groups 2 and 3 for the third comparison.

SPSS OUTPUT

Comparing Group 1 (Placebo) to Group 2 (Low Dose)

NPar Tests

Descriptive Statistics

30 -.20 5.182 -9 12 30 2.00 .830 1 3

Diff_Score Vitamin C Treatment

N Mean Std. Deviation Minimum Maximum

KRUSKAL-WALLIS TEST

Test Statisticsb

-1. . .052a

Mann-Whitney U Wilcoxon W Z Asymp. Sig. (2-tailed) Exact Sig. [2*(1-tailed Sig.)]

Diff_Score

a. Not corrected for ties. b. Grouping Variable: Vitamin C Treatment

Comparing Group 2 (Low Dose) to Group 3 (High Dose)

NPar Tests

Descriptive Statistics

30 -.20 5.182 -9 12 30 2.00 .830 1 3

Diff_Score Vitamin C Treatment

N Mean Std. Deviation Minimum Maximum

Mann-Whitney Test

Ranks

10 11.00 110. 10 10.00 100. 20

Vitamin C Treatment Low Dose High Dose Total

Diff_Score

N Mean Rank Sum of Ranks

Test Statisticsb

-. . .739a

Mann-Whitney U Wilcoxon W Z Asymp. Sig. (2-tailed) Exact Sig. [2*(1-tailed Sig.)]

Diff_Score

a. Not corrected for ties. b. Grouping Variable: Vitamin C Treatment

KRUSKAL-WALLIS TEST

APA RESULTS

Based on the results produced from the above example, the APA results would be:

A Kruskal-Wallis test was conducted to evaluate differences among the three vitamin C

conditions (Placebo, Low Dose of Vitamin C, and High Dose of Vitamin C) on median change in

number of days with cold symptoms (number of days with colds during treatment minus number

of days with colds prior to treatment). The test, which was corrected for tied ranks, was

significant χ^2 (2, N = 30) = 6.92, p = .03. The proportion of variability in the ranked dependent

variable accounted for by the vitamin C treatment variable was .24, indicating a fairly strong

relationship between vitamin C treatment and the change in the number of days with colds.

Follow-up tests were conducted to evaluate pairwise differences among the three groups,

controlling for Type I error across tests by using the Bonferroni approach. The results of these

tests indicated a significant difference between the placebo group and the low-dose vitamin C

group. The typical decrease in number of days with cold symptoms after treatment was greater

for the low-dose vitamin C treatment group than for the placebo group.

*The following Case Summaries Table may be needed to better understand the above results…

Case Summaries Diff_Score

10 3. 10 -2. 10 -2. 30 -.

Vitamin C Treatment Placebo Low Dose High Dose Total

N Mean

REFERENCE

Green, S. B., & Salkind, N. J. (2008). Using SPSS for Window and Macintosh: Analyzing and

understanding data (5th ed.). Upper Saddle River, NJ: Pearson Prentice Hall.