R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(89 + ,81 + ,109 + ,83 + ,95 + ,90 + ,91 + ,88 + ,102 + ,92 + ,82 + ,96 + ,87 + ,75 + ,85 + ,82 + ,85 + ,78 + ,92 + ,83 + ,71 + ,74 + ,72 + ,94 + ,73 + ,80 + ,78 + ,85 + ,88 + ,81 + ,62 + ,71 + ,73 + ,77 + ,63 + ,77 + ,72 + ,77 + ,63 + ,77 + ,80 + ,87 + ,90 + ,73 + ,82 + ,87 + ,72 + ,78 + ,85 + ,82 + ,96 + ,90 + ,96 + ,80 + ,95 + ,80 + ,87 + ,84 + ,77 + ,85 + ,85 + ,89 + ,87 + ,67 + ,88 + ,89 + ,110 + ,105 + ,98 + ,98 + ,89 + ,95 + ,89 + ,89 + ,87 + ,73 + ,72 + ,78 + ,63 + ,71 + ,88 + ,70 + ,96 + ,97 + ,89 + ,86 + ,79 + ,79 + ,77 + ,86 + ,83 + ,92 + ,90 + ,96 + ,88 + ,91 + ,93 + ,96 + ,84 + ,93 + ,98 + ,97 + ,95 + ,94 + ,95 + ,80 + ,75 + ,79 + ,70 + ,78 + ,84 + ,88 + ,86 + ,100 + ,84 + ,90 + ,105 + ,99 + ,88 + ,97 + ,92 + ,82 + ,111 + ,97 + ,95 + ,86 + ,89 + ,105 + ,78 + ,88 + ,117 + ,114 + ,123 + ,108 + ,121 + ,88 + ,81 + ,102 + ,81 + ,97 + ,86 + ,73 + ,82 + ,96 + ,82 + ,78 + ,82 + ,86 + ,84 + ,82 + ,104 + ,110 + ,117 + ,104 + ,108 + ,89 + ,93 + ,94 + ,87 + ,90 + ,99 + ,114 + ,110 + ,98 + ,113 + ,84 + ,91 + ,86 + ,89 + ,86 + ,89 + ,97 + ,109 + ,93 + ,105 + ,95 + ,97 + ,118 + ,89 + ,105 + ,58 + ,68 + ,64 + ,63 + ,60 + ,77 + ,72 + ,78 + ,84 + ,75 + ,77 + ,81 + ,86 + ,82 + ,79 + ,98 + ,102 + ,98 + ,105 + ,104 + ,58 + ,62 + ,64 + ,70 + ,60 + ,81 + ,102 + ,84 + ,94 + ,87 + ,92 + ,84 + ,87 + ,101 + ,93 + ,94 + ,75 + ,88 + ,83 + ,85 + ,87 + ,102 + ,106 + ,88 + ,97 + ,75 + ,62 + ,78 + ,69 + ,67 + ,80 + ,100 + ,79 + ,94 + ,85 + ,84 + ,82 + ,95 + ,82 + ,86 + ,87 + ,78 + ,98 + ,82 + ,88 + ,114 + ,106 + ,101 + ,109 + ,114 + ,97 + ,88 + ,104 + ,86 + ,97 + ,102 + ,85 + ,91 + ,99 + ,93 + ,80 + ,97 + ,78 + ,82 + ,80 + ,112 + ,114 + ,123 + ,114 + ,118 + ,104 + ,105 + ,109 + ,99 + ,109 + ,75 + ,100 + ,77 + ,91 + ,81 + ,82 + ,72 + ,77 + ,81 + ,79 + ,92 + ,106 + ,102 + ,102 + ,104 + ,102 + ,78 + ,88 + ,101 + ,97 + ,73 + ,80 + ,81 + ,72 + ,75 + ,78 + ,88 + ,83 + ,91 + ,82 + ,74 + ,62 + ,72 + ,83 + ,71 + ,92 + ,93 + ,95 + ,102 + ,92 + ,97 + ,87 + ,109 + ,103 + ,104 + ,92 + ,109 + ,91 + ,93 + ,99 + ,91 + ,91 + ,87 + ,88 + ,89 + ,102 + ,110 + ,112 + ,110 + ,114 + ,89 + ,98 + ,95 + ,100 + ,95 + ,98 + ,99 + ,103 + ,88 + ,106 + ,117 + ,95 + ,108 + ,119 + ,117 + ,92 + ,97 + ,116 + ,98 + ,109 + ,70 + ,88 + ,71 + ,90 + ,74 + ,63 + ,72 + ,70 + ,69 + ,63 + ,91 + ,102 + ,105 + ,98 + ,103 + ,106 + ,95 + ,112 + ,98 + ,107 + ,81 + ,93 + ,86 + ,81 + ,86 + ,98 + ,90 + ,109 + ,93 + ,99 + ,88 + ,80 + ,112 + ,91 + ,87 + ,95 + ,75 + ,97 + ,86 + ,93 + ,105 + ,109 + ,122 + ,95 + ,114 + ,90 + ,75 + ,97 + ,87 + ,82 + ,58 + ,72 + ,64 + ,63 + ,60 + ,86 + ,77 + ,84 + ,89 + ,83 + ,112 + ,93 + ,110 + ,108 + ,111 + ,71 + ,72 + ,70 + ,99 + ,75 + ,98 + ,91 + ,100 + ,90 + ,94 + ,87 + ,95 + ,102 + ,91 + ,91 + ,98 + ,111 + ,108 + ,82 + ,100 + ,117 + ,105 + ,123 + ,119 + ,121 + ,98 + ,90 + ,78 + ,97 + ,90 + ,98 + ,105 + ,109 + ,108 + ,105 + ,90 + ,90 + ,106 + ,101 + ,97 + ,84 + ,92 + ,95 + ,96 + ,92 + ,86 + ,95 + ,108 + ,97 + ,92 + ,68 + ,75 + ,74 + ,69 + ,67 + ,86 + ,92 + ,86 + ,89 + ,90 + ,77 + ,100 + ,82 + ,84 + ,85 + ,83 + ,82 + ,88 + ,79 + ,85 + ,90 + ,102 + ,96 + ,103 + ,97 + ,107 + ,104 + ,114 + ,92 + ,118 + ,102 + ,98 + ,111 + ,104 + ,109 + ,90 + ,95 + ,88 + ,102 + ,94 + ,113 + ,114 + ,123 + ,106 + ,121 + ,86 + ,93 + ,89 + ,93 + ,85 + ,105 + ,110 + ,114 + ,108 + ,112 + ,110 + ,104 + ,121 + ,119 + ,118 + ,82 + ,91 + ,100 + ,102 + ,93 + ,89 + ,79 + ,83 + ,83 + ,85 + ,99 + ,97 + ,92 + ,92 + ,97 + ,113 + ,102 + ,108 + ,119 + ,121 + ,91 + ,77 + ,87 + ,100 + ,83 + ,92 + ,105 + ,84 + ,97 + ,89 + ,86 + ,95 + ,95 + ,103 + ,92 + ,91 + ,104 + ,90 + ,95 + ,89 + ,82 + ,75 + ,82 + ,73 + ,82 + ,86 + ,82 + ,84 + ,86 + ,85 + ,86 + ,91 + ,96 + ,88 + ,92 + ,102 + ,105 + ,109 + ,102 + ,112 + ,84 + ,71 + ,84 + ,87 + ,79 + ,80 + ,89 + ,83 + ,100 + ,84 + ,96 + ,79 + ,93 + ,88 + ,92 + ,117 + ,113 + ,120 + ,100 + ,118 + ,88 + ,82 + ,83 + ,79 + ,82 + ,99 + ,102 + ,103 + ,90 + ,100 + ,89 + ,82 + ,103 + ,83 + ,87 + ,86 + ,92 + ,102 + ,95 + ,97 + ,98 + ,82 + ,90 + ,89 + ,87 + ,58 + ,86 + ,69 + ,64 + ,70 + ,98 + ,108 + ,114 + ,108 + ,110 + ,58 + ,74 + ,64 + ,80 + ,60 + ,81 + ,87 + ,87 + ,83 + ,81 + ,90 + ,97 + ,116 + ,96 + ,94 + ,112 + ,102 + ,121 + ,108 + ,114 + ,84 + ,75 + ,90 + ,86 + ,85 + ,84 + ,82 + ,92 + ,88 + ,85 + ,75 + ,72 + ,81 + ,97 + ,79 + ,78 + ,88 + ,84 + ,110 + ,82 + ,94 + ,97 + ,106 + ,102 + ,102 + ,75 + ,85 + ,75 + ,92 + ,73 + ,82 + ,62 + ,79 + ,91 + ,78 + ,87 + ,95 + ,80 + ,92 + ,84 + ,59 + ,95 + ,74 + ,72 + ,70 + ,68 + ,72 + ,66 + ,88 + ,66 + ,80 + ,92 + ,81 + ,99 + ,79 + ,94 + ,91 + ,98 + ,95 + ,95 + ,87 + ,97 + ,99 + ,83 + ,95 + ,70 + ,78 + ,68 + ,68 + ,69 + ,113 + ,95 + ,100 + ,101 + ,109 + ,99 + ,91 + ,97 + ,91 + ,100 + ,90 + ,95 + ,99 + ,89 + ,91 + ,102 + ,88 + ,104 + ,98 + ,99 + ,80 + ,92 + ,82 + ,89 + ,84 + ,98 + ,97 + ,92 + ,98 + ,101 + ,98 + ,104 + ,99 + ,97 + ,99 + ,95 + ,113 + ,109 + ,98 + ,104 + ,104 + ,113 + ,106 + ,113 + ,109 + ,86 + ,82 + ,89 + ,83 + ,87 + ,84 + ,90 + ,87 + ,92 + ,88 + ,85 + ,91 + ,98 + ,113 + ,87 + ,90 + ,95 + ,95 + ,103 + ,95 + ,86 + ,102 + ,92 + ,96 + ,92 + ,97 + ,92 + ,90 + ,94 + ,100) + ,dim=c(5 + ,162) + ,dimnames=list(c('WJ7ARD' + ,'WJ7AMA' + ,'WJ7AWL' + ,'WJ7AKN' + ,'WJ7ASK') + ,1:162)) > y <- array(NA,dim=c(5,162),dimnames=list(c('WJ7ARD','WJ7AMA','WJ7AWL','WJ7AKN','WJ7ASK'),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'pearson' > main = 'Correlation Matrix' > par1 <- 'pearson' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Patrick Wessa, (2012), Multivariate Correlation Matrix (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Patrick.Wessa/rwasp_pairs.wasp/ > #Source of accompanying publication: > # > 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/1a68q1349991895.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/26hid1349991896.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) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = 10.2402, df = 160, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.5260587 0.7141245 sample estimates: cor 0.6292149 > 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/34c9y1349991896.tab") > > try(system("convert tmp/1a68q1349991895.ps tmp/1a68q1349991895.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.277 0.137 1.408