#script created by HW # calculate Wilcoxon test for responsivness r<-read.csv("responsiveness.csv", header=T) names(r) str(r) r$new_variable<-as.numeric(r$new_variable) r$response<-as.numeric(r$response) # wilcoxon requires that x and x must be numeric #add two new variables # familiar==1 # unfamiliar==0 wilcox.test(r$new_variable,r$response, exact=TRUE,conf.int=TRUE) ## Wilcoxon rank sum test with continuity correction ## data: r$new_variable and r$response ## W = 451.5, p-value = 2.342e-05 ## alternative hypothesis: true location shift is not equal to 0 ## 95 percent confidence interval: ## -1.000030e+00 -8.722424e-06 ## sample estimates: ## difference in location ## -0.9999894