The Wilcoxon Signed Rank test is the non-parametric equivalent of a dependent samples t-test. Note, the name is very close to its independent samples equivalent. For example, if you have dependent measurements (day one versus day two) and you have concerns about the normality of the difference scores it would be appropriate to use a Wilcoxon Signed Rank 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. Note that the participant numbers repeat themselves indicating a repeated or dependent measurement.
data = read.table("ttestdata2.txt")
To assess the normality of the difference scores, you could do a couple of different things. One might be:
data1 = data$V3[data$V2==1]
data2 = data$V3[data$V2==2]
differences = data2-data1
hist(differences)
The resulting histogram looks normal, so you could use a dependent samples ttest:
t.test(data$V3~factor(data$V2),paired=TRUE)
But, if you were concerned about a violation of the assumption you could use the Wilcoxon Signed Rank test:
wilcox.test(data$V3~factor(data$V2),paired=TRUE)
As with the test in the previous assignment, this test returns a p value and a test statistics, in this instance V. Sorry to be confusing, but V actually reflects T - a difference in the positive and negative ranked values (see Field).
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. Note that the participant numbers repeat themselves indicating a repeated or dependent measurement.
data = read.table("ttestdata2.txt")
To assess the normality of the difference scores, you could do a couple of different things. One might be:
data1 = data$V3[data$V2==1]
data2 = data$V3[data$V2==2]
differences = data2-data1
hist(differences)
The resulting histogram looks normal, so you could use a dependent samples ttest:
t.test(data$V3~factor(data$V2),paired=TRUE)
But, if you were concerned about a violation of the assumption you could use the Wilcoxon Signed Rank test:
wilcox.test(data$V3~factor(data$V2),paired=TRUE)
As with the test in the previous assignment, this test returns a p value and a test statistics, in this instance V. Sorry to be confusing, but V actually reflects T - a difference in the positive and negative ranked values (see Field).