R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1838 + ,42 + ,11 + ,34 + ,45 + ,1056 + ,50 + ,8 + ,28 + ,37 + ,1115 + ,39 + ,14 + ,29 + ,37 + ,968 + ,40 + ,9 + ,28 + ,34 + ,1384 + ,78 + ,14 + ,46 + ,34 + ,1075 + ,43 + ,8 + ,27 + ,32 + ,1331 + ,46 + ,9 + ,26 + ,32 + ,791 + ,34 + ,11 + ,30 + ,31 + ,1132 + ,57 + ,10 + ,33 + ,31 + ,1112 + ,51 + ,12 + ,33 + ,31 + ,1086 + ,27 + ,8 + ,23 + ,30 + ,865 + ,41 + ,9 + ,28 + ,29 + ,880 + ,58 + ,9 + ,25 + ,28 + ,1162 + ,32 + ,10 + ,32 + ,27 + ,1077 + ,39 + ,8 + ,22 + ,27 + ,1554 + ,42 + ,12 + ,31 + ,27 + ,649 + ,16 + ,8 + ,26 + ,26 + ,760 + ,45 + ,9 + ,24 + ,26 + ,1125 + ,54 + ,15 + ,51 + ,26 + ,895 + ,41 + ,9 + ,31 + ,25 + ,843 + ,56 + ,14 + ,44 + ,25 + ,665 + ,49 + ,12 + ,38 + ,25 + ,782 + ,45 + ,9 + ,29 + ,24 + ,670 + ,16 + ,10 + ,34 + ,24 + ,668 + ,44 + ,8 + ,28 + ,23 + ,628 + ,31 + ,11 + ,35 + ,23 + ,603 + ,41 + ,19 + ,65 + ,23 + ,863 + ,26 + ,9 + ,26 + ,23 + ,620 + ,53 + ,10 + ,29 + ,22 + ,706 + ,31 + ,13 + ,35 + ,22 + ,589 + ,30 + ,9 + ,13 + ,22 + ,670 + ,41 + ,11 + ,28 + ,22 + ,822 + ,42 + ,8 + ,20 + ,22 + ,748 + ,34 + ,12 + ,38 + ,21 + ,714 + ,37 + ,11 + ,30 + ,21 + ,858 + ,25 + ,8 + ,28 + ,21 + ,608 + ,30 + ,13 + ,40 + ,21 + ,584 + ,59 + ,10 + ,32 + ,21 + ,1058 + ,38 + ,8 + ,26 + ,20 + ,564 + ,50 + ,10 + ,28 + ,20 + ,634 + ,33 + ,8 + ,28 + ,20 + ,613 + ,18 + ,10 + ,35 + ,20 + ,694 + ,56 + ,12 + ,20 + ,20 + ,580 + ,80 + ,9 + ,22 + ,20 + ,623 + ,55 + ,10 + ,25 + ,20 + ,846 + ,37 + ,10 + ,31 + ,20 + ,653 + ,47 + ,11 + ,28 + ,19 + ,432 + ,33 + ,10 + ,26 + ,19 + ,773 + ,14 + ,10 + ,33 + ,19 + ,659 + ,34 + ,8 + ,27 + ,18 + ,368 + ,43 + ,10 + ,25 + ,18 + ,474 + ,25 + ,8 + ,14 + ,18 + ,497 + ,31 + ,10 + ,27 + ,18 + ,585 + ,51 + ,9 + ,23 + ,18 + ,936 + ,25 + ,8 + ,28 + ,18 + ,573 + ,33 + ,14 + ,27 + ,18 + ,528 + ,37 + ,12 + ,39 + ,18 + ,817 + ,55 + ,10 + ,30 + ,18 + ,375 + ,19 + ,9 + ,29 + ,18 + ,974 + ,18 + ,8 + ,28 + ,18 + ,400 + ,35 + ,8 + ,28 + ,17 + ,709 + ,42 + ,8 + ,16 + ,17 + ,523 + ,33 + ,11 + ,20 + ,17 + ,611 + ,75 + ,10 + ,28 + ,17 + ,637 + ,20 + ,9 + ,16 + ,17 + ,608 + ,43 + ,8 + ,23 + ,17 + ,557 + ,38 + ,8 + ,24 + ,17 + ,550 + ,43 + ,10 + ,31 + ,17 + ,429 + ,13 + ,9 + ,19 + ,17 + ,566 + ,39 + ,10 + ,30 + ,17 + ,681 + ,39 + ,8 + ,27 + ,17 + ,596 + ,32 + ,6 + ,9 + ,17 + ,578 + ,50 + ,9 + ,29 + ,17 + ,696 + ,14 + ,7 + ,22 + ,16 + ,875 + ,10 + ,10 + ,34 + ,16 + ,874 + ,20 + ,13 + ,35 + ,16 + ,510 + ,45 + ,12 + ,43 + ,16 + ,744 + ,25 + ,11 + ,18 + ,16 + ,405 + ,42 + ,8 + ,23 + ,16 + ,618 + ,19 + ,10 + ,27 + ,15 + ,787 + ,37 + ,9 + ,28 + ,15 + ,432 + ,41 + ,6 + ,17 + ,15 + ,431 + ,19 + ,8 + ,27 + ,15 + ,756 + ,35 + ,8 + ,19 + ,15 + ,592 + ,26 + ,12 + ,40 + ,15 + ,496 + ,11 + ,10 + ,29 + ,15 + ,577 + ,18 + ,11 + ,33 + ,14 + ,417 + ,7 + ,12 + ,33 + ,14 + ,363 + ,17 + ,8 + ,24 + ,14 + ,619 + ,39 + ,6 + ,23 + ,14 + ,573 + ,31 + ,7 + ,24 + ,14 + ,635 + ,16 + ,10 + ,32 + ,14 + ,479 + ,42 + ,4 + ,11 + ,14 + ,676 + ,15 + ,10 + ,13 + ,14 + ,416 + ,27 + ,17 + ,53 + ,14 + ,489 + ,19 + ,8 + ,18 + ,14 + ,520 + ,20 + ,8 + ,24 + ,13 + ,300 + ,12 + ,10 + ,34 + ,13 + ,540 + ,31 + ,10 + ,8 + ,13 + ,433 + ,33 + ,9 + ,9 + ,13 + ,474 + ,12 + ,5 + ,13 + ,13 + ,449 + ,8 + ,8 + ,17 + ,13 + ,1059 + ,18 + ,8 + ,2 + ,13 + ,494 + ,65 + ,8 + ,28 + ,13 + ,494 + ,8 + ,13 + ,29 + ,12 + ,569 + ,14 + ,10 + ,33 + ,12 + ,433 + ,11 + ,8 + ,8 + ,12 + ,371 + ,22 + ,14 + ,19 + ,12 + ,368 + ,10 + ,10 + ,35 + ,12 + ,303 + ,13 + ,12 + ,35 + ,12 + ,384 + ,14 + ,8 + ,26 + ,12 + ,425 + ,33 + ,9 + ,32 + ,12 + ,581 + ,17 + ,10 + ,28 + ,12 + ,459 + ,37 + ,13 + ,25 + ,12 + ,466 + ,18 + ,8 + ,22 + ,12 + ,442 + ,11 + ,7 + ,25 + ,11 + ,498 + ,8 + ,9 + ,19 + ,11 + ,435 + ,23 + ,9 + ,22 + ,11 + ,378 + ,10 + ,9 + ,32 + ,10 + ,526 + ,16 + ,8 + ,21 + ,10 + ,320 + ,13 + ,10 + ,26 + ,10 + ,478 + ,10 + ,11 + ,25 + ,10 + ,376 + ,19 + ,8 + ,10 + ,10 + ,243 + ,16 + ,10 + ,35 + ,10 + ,293 + ,16 + ,9 + ,31 + ,10 + ,619 + ,18 + ,10 + ,30 + ,10 + ,359 + ,34 + ,8 + ,9 + ,9 + ,434 + ,12 + ,10 + ,32 + ,9 + ,316 + ,55 + ,5 + ,20 + ,9 + ,563 + ,7 + ,7 + ,21 + ,9 + ,314 + ,11 + ,6 + ,12 + ,9 + ,447 + ,15 + ,5 + ,17 + ,9 + ,393 + ,14 + ,8 + ,25 + ,8 + ,231 + ,22 + ,10 + ,15 + ,8 + ,474 + ,28 + ,7 + ,24 + ,8 + ,394 + ,24 + ,4 + ,8 + ,8 + ,397 + ,13 + ,10 + ,34 + ,7 + ,297 + ,13 + ,5 + ,17 + ,7 + ,343 + ,11 + ,8 + ,24 + ,7 + ,287 + ,10 + ,10 + ,27 + ,7 + ,209 + ,14 + ,4 + ,3 + ,6 + ,376 + ,8 + ,4 + ,7 + ,6 + ,470 + ,11 + ,9 + ,12 + ,6 + ,413 + ,1 + ,6 + ,13 + ,6 + ,231 + ,0 + ,8 + ,21 + ,6 + ,227 + ,2 + ,8 + ,23 + ,6 + ,171 + ,1 + ,7 + ,11 + ,5 + ,229 + ,3 + ,3 + ,7 + ,5 + ,307 + ,4 + ,0 + ,0 + ,5 + ,147 + ,0 + ,0 + ,0 + ,5 + ,336 + ,12 + ,1 + ,0 + ,5 + ,214 + ,2 + ,4 + ,2 + ,4 + ,206 + ,4 + ,0 + ,0 + ,4 + ,151 + ,7 + ,0 + ,0 + ,2 + ,76 + ,0 + ,3 + ,8 + ,2 + ,29 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,5 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,8 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,0 + ,0 + ,0 + ,0) + ,dim=c(5 + ,164) + ,dimnames=list(c('P' + ,'B' + ,'PR' + ,'LFM' + ,'H') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('P','B','PR','LFM','H'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'kendall' > main = 'Correlation Matrix' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > panel.tau <- function(x, y, digits=2, prefix='', cex.cor) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(0, 1, 0, 1)) + rr <- cor.test(x, y, method=par1) + r <- round(rr$p.value,2) + txt <- format(c(r, 0.123456789), digits=digits)[1] + txt <- paste(prefix, txt, sep='') + if(missing(cex.cor)) cex <- 0.5/strwidth(txt) + text(0.5, 0.5, txt, cex = cex) + } > panel.hist <- function(x, ...) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(usr[1:2], 0, 1.5) ) + h <- hist(x, plot = FALSE) + breaks <- h$breaks; nB <- length(breaks) + y <- h$counts; y <- y/max(y) + rect(breaks[-nB], 0, breaks[-1], y, col='grey', ...) + } > postscript(file="/var/wessaorg/rcomp/tmp/14a081319150247.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main) > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > n <- length(y[,1]) > n [1] 5 > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ',header=TRUE) > for (i in 1:n) { + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + } > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + for (j in 1:n) { + r <- cor.test(y[i,],y[j,],method=par1) + a<-table.element(a,round(r$estimate,3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2pws71319150247.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'Pearson r',1,TRUE) > a<-table.element(a,'Spearman rho',1,TRUE) > a<-table.element(a,'Kendall tau',1,TRUE) > a<-table.row.end(a) > cor.test(y[1,],y[2,],method=par1) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 9.0408, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.480878 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') + a<-table.element(a,dum,header=TRUE) + rp <- cor.test(y[i,],y[j,],method='pearson') + a<-table.element(a,round(rp$estimate,4)) + rs <- cor.test(y[i,],y[j,],method='spearman') + a<-table.element(a,round(rs$estimate,4)) + rk <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,round(rk$estimate,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-value',header=T) + a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) + a<-table.row.end(a) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 2: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 3: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 4: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 5: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 6: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 7: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 8: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 9: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 10: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3ensv1319150247.tab") > > try(system("convert tmp/14a081319150247.ps tmp/14a081319150247.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.067 0.089 1.157