# 26 X <- read.csv("schizo.csv", header = TRUE) Y <- X[,1] - X[,2] t.test(Y) plot(X[,1], X[,2]) # evidence that the paired design seems to work Ylog <- log(X[,1]/X[,2]) t.test(Ylog) # p-value is somewhat smaller compared to the untransformed case print( CImed <- exp(t.test(Ylog)$conf.int) ) # 27 wilcox.test(Ylog) # the results are of course similar to the Book's section 4.4.2 wilcox.test(Y) # the results of the untransformed test are identical, so we can pick the one that is more symmetrical # which would be neither in this particular case ;) # 29 exer <- c(9, 9.5, 9.5, 9.75, 10, 13) noex <- c(9, 11.5, 11.5, 12, 13, 13.25) wilcox.test(exer, noex)