#5.4 Whiskey Example x<-matrix(c(1,3,1,3,5,1,5,2,5,3,7,1,7,1,7,2),ncol=2,byrow=T) colnames(x)<-c("Age","Grade") x #The whiskey age ranks are inverted in this example (older whiskey is better ranked). x[,1]<-(8-x[,1]) xtotab2(x) CorrelationAnalysis(x) 8*sum(CorrelationAnalysis(x)$correlations^2)