The Wilcoxon Rank Sum test is the non-parametric equivalent of an independent samples t-test. For example, if you have two independent groups (no one is in both groups) and you have concerns about normality and/or homogeneity of variance then it would be appropriate to use a Wilcoxon Rank Sum Test.
Load the data HERE into R into a table called data. Column 1 is participant numbers, column 2 is a grouping variable, and column 3 is the dependent measure.
data = read.table("ttestdata.txt")
Because the data reflects two independent groups, you find run Levene's Test to check for Homogeneity of Variance:
library(car)
leveneTest(data$V3~factor(data$V2))
You should see that test is significant, thus indicating a violation of the assumption.
You could run an independent samples t-test using the following command:
t.test(data$V3~factor(data$V2))
The test is significant, but this is actually inappropriate given the failure of the assumption. Instead, you run the appropriate non-parametric test.
To run a Wilcoxon Rank Sum test in R one would simply do the following:
wilcox.test(data$V3~factor(data$V2))
You should see that the result of this test is also significant in this instance - however, there are instances where the independent samples t test would be significant and the Wilcoxon Test would not be given the failure of the assumption. The test reports a traditional p value and W, the Wilcoxon Test statistic which reflects the sum of the ranks minus the mean rank (see Field for more detail).
Load the data HERE into R into a table called data. Column 1 is participant numbers, column 2 is a grouping variable, and column 3 is the dependent measure.
data = read.table("ttestdata.txt")
Because the data reflects two independent groups, you find run Levene's Test to check for Homogeneity of Variance:
library(car)
leveneTest(data$V3~factor(data$V2))
You should see that test is significant, thus indicating a violation of the assumption.
You could run an independent samples t-test using the following command:
t.test(data$V3~factor(data$V2))
The test is significant, but this is actually inappropriate given the failure of the assumption. Instead, you run the appropriate non-parametric test.
To run a Wilcoxon Rank Sum test in R one would simply do the following:
wilcox.test(data$V3~factor(data$V2))
You should see that the result of this test is also significant in this instance - however, there are instances where the independent samples t test would be significant and the Wilcoxon Test would not be given the failure of the assumption. The test reports a traditional p value and W, the Wilcoxon Test statistic which reflects the sum of the ranks minus the mean rank (see Field for more detail).