> #Example 3.1 Hamilton Depression Scale Factor IV > > sf.data <- read.table("http://www.rohan.sdsu.edu/~babailey/stat672/t3-1.txt", header=T) > sf.data x y 1 1.83 0.878 2 0.50 0.647 3 1.62 0.598 4 2.48 2.050 5 1.68 1.060 6 1.88 1.290 7 1.55 1.060 8 3.06 3.140 9 1.30 1.290 > attach(sf.data) > > wilcox.test(y, x, paired=TRUE, alternative="less") Wilcoxon signed rank test data: y and x V = 5, p-value = 0.01953 alternative hypothesis: true location shift is less than 0 > > #or the exact test: > library(exactRankTests) Package 'exactRankTests' is no longer under development. Please consider using package 'coin' instead. > wilcox.exact(y, x, paired = TRUE, alternative = "less") Exact Wilcoxon signed rank test data: y and x V = 5, p-value = 0.01953 alternative hypothesis: true mu is less than 0 > > #There is a R psignrank function >