Table of Contents
Wilcoxon Signed-rank test
A Wilcoxon Signed-rank test is a non-parametric version of a paired t test. The case where you want to use a Wilcoxon Signed-rank test is the same as a Mann-Whitney's U test, and the data are paired (i.e., the samples are independent).
What does Wilcoxon Signed-rank do?
Now we are looking at how a Wilcoxon Signed-rank test works. If you haven't read the Mann-Whitney's U test page, it would be good to read it before going ahead because the explanation is kind of similar.
As a Mann-Whitney's U test, a Wilcoxon Signed-rank test is that it treats the data as ordinal data. So what a Wilcoxon Signed-rank test is also to calculate the rank for each value, but calculate them based on the differences between the two groups. Let's think about some data from a 7-Likert scale question and say you have the following data.
Each column represents the paired data. You make the difference for each paired data point.
Then, calculate the ranks for the differences.
And combine the sign for each rank.
Now calculate the sums of the positive and negative ranks, which is called W value. The positive W is 8.5, and the negative W is 27.5. And we use the smaller W value, which is 8.5. A Wilcoxon Signed-rank test checks how likely it would be W=8.5.
The calculation of the effect size of Wilcoxon Signed-rank test is fairly easy.
where N is the total number of the samples. Here is the standard value of r for small, medium, and large sizes.
|small size||medium size||large size|
R code example
Let's prepare the data. Create the data like the results from a 5-Likert scale question (the response is 1, 2, 3, 4, or 5), and you have two groups (Group) to compare.
Then, do a Wilcoxon Sign-rank test.
And you get the result.
From this result, we can see that the statistic to be used for a Wilcoxon test is 1. It is usually denoted as “W”, but in R, it is presented as “V”. However, as you can see here, the exact p value cannot be calculated because of ties. To address this, we need to use coin package.
Then, do another Wilcoxon test. But you have to format the data for the Wilcoxon test with coin.
Now you get another result.
Thus, we have a significant effect of Group. You also calculate the effect size:
How to report
You can report the results of an Wilcoxon test as follows: The medians of Group A and Group B were 2.0 and 4.5, respectively. An Wilcoxon Signed-rank test shows that there is a significant effect of Group (W = 1, Z = -2.39, p < 0.05, r = 0.53).
For the effect size, please see: Field, A. Discovering statistics using SPSS. (2nd edition).