pdf("ex0304.pdf") # Read in data from ASCII formatted (Fixed With File) ex0304dat <- read.fwf("http://www.stat.ufl.edu/~winner/data/biostat/ex0304.dat", width=c(8,8), col.names=c("group","auc")) # Create a dataset (frame) from input data ex0304 <- data.frame(ex0304dat) # Attach the dataset for analysis attach(ex0304) # Conduct the t-test, auc is the dependent variable, group is independent variable # var.equal=T (true) says to use the procedure vased on the pooled standard deviation (equal variance case) t.test(auc~group, var.equal=T) # Conduct the Wilcoxon rank-sum test, auc is the dependent variable, group is independent variable # Note that the W statistic is the rank-sum for group 1 minus the smallest value it could # take on. So in texts notation: W=T1-(1+2+...+n1). P-values are not effected by the transformation wilcox.test(auc~group) # Obtain a plot of auc (y-axis) versus group (x-axis) plot(group,auc) dev.off()