R version 2.8.1 (2008-12-22) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(102.1 + ,100.35 + ,115.43 + ,105.16 + ,102.86 + ,100.35 + ,115.55 + ,105.16 + ,102.99 + ,100.36 + ,117.14 + ,105.16 + ,103.73 + ,100.39 + ,119.09 + ,105.16 + ,105.02 + ,100.34 + ,119.55 + ,105.16 + ,104.43 + ,100.34 + ,119.8 + ,105.17 + ,104.63 + ,100.35 + ,121.32 + ,105.17 + ,104.93 + ,100.43 + ,121.48 + ,105.54 + ,105.87 + ,100.47 + ,119.63 + ,106.9 + ,105.66 + ,100.67 + ,118.61 + ,107.27 + ,106.76 + ,100.75 + ,118.82 + ,107.31 + ,106 + ,100.78 + ,119.93 + ,107.39 + ,107.22 + ,100.79 + ,118.7 + ,107.41 + ,107.33 + ,100.67 + ,119.99 + ,107.46 + ,107.11 + ,100.64 + ,116.67 + ,113.14 + ,108.86 + ,100.64 + ,116.84 + ,117 + ,107.72 + ,100.76 + ,115.17 + ,119.28 + ,107.88 + ,100.79 + ,114.21 + ,119.39 + ,108.38 + ,100.79 + ,114.77 + ,119.5 + ,107.72 + ,100.9 + ,115.59 + ,119.67 + ,108.41 + ,100.98 + ,116.64 + ,119.67 + ,109.9 + ,101.11 + ,118.79 + ,119.73 + ,111.45 + ,101.18 + ,125.63 + ,119.77 + ,112.18 + ,101.22 + ,127.42 + ,119.77 + ,113.34 + ,101.23 + ,131.17 + ,119.78 + ,113.46 + ,101.09 + ,137.68 + ,119.78 + ,114.06 + ,101.26 + ,144.41 + ,119.78 + ,115.54 + ,101.28 + ,146.09 + ,121.28 + ,116.39 + ,101.43 + ,151.26 + ,122.44 + ,115.94 + ,101.53 + ,156.56 + ,122.72 + ,116.97 + ,101.54 + ,158.38 + ,122.75 + ,115.94 + ,101.54 + ,154.21 + ,122.8 + ,115.91 + ,101.79 + ,158.06 + ,122.81 + ,116.43 + ,102.18 + ,154.83 + ,122.83 + ,116.26 + ,102.37 + ,150.89 + ,122.83 + ,116.35 + ,102.46 + ,149.22 + ,122.83 + ,117.9 + ,102.46 + ,148.34 + ,122.84 + ,117.7 + ,102.03 + ,143.88 + ,122.85 + ,117.53 + ,102.26 + ,134.48 + ,123.61 + ,117.86 + ,102.33 + ,133.73 + ,124.74 + ,117.65 + ,102.44 + ,130.08 + ,125.1 + ,116.51 + ,102.5 + ,123.11 + ,125.29 + ,115.93 + ,102.52 + ,122.08 + ,125.45 + ,115.31 + ,102.66 + ,126.83 + ,125.51 + ,115 + ,102.72 + ,123.17 + ,125.55) + ,dim=c(4 + ,45) + ,dimnames=list(c('vmtot' + ,'ktot' + ,'btot' + ,'ttot') + ,1:45)) > y <- array(NA,dim=c(4,45),dimnames=list(c('vmtot','ktot','btot','ttot'),1:45)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > main = 'Kendall Tau Correlation Plot' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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='kendall') + 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/www/rcomp/tmp/1aqf31257426225.ps",horizontal=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) Warning messages: 1: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties 2: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties 3: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties 4: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties 5: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties 6: In cor.test.default(x, y, method = "kendall") : Cannot compute exact p-value with ties > dev.off() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Kendall tau rank correlations for all pairs of data series',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'tau',1,TRUE) > a<-table.element(a,'p-value',1,TRUE) > a<-table.row.end(a) > n <- length(y[,1]) > n [1] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 7.332, p-value = 2.267e-13 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7615738 Warning message: In cor.test.default(y[1, ], y[2, ], method = "kendall") : Cannot compute exact p-value with ties > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste('tau(',dimnames(t(x))[[2]][i]) + dum <- paste(dum,',') + dum <- paste(dum,dimnames(t(x))[[2]][j]) + dum <- paste(dum,')') + a<-table.element(a,dum,header=TRUE) + r <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,r$estimate) + a<-table.element(a,r$p.value) + a<-table.row.end(a) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties 2: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties 3: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties 4: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties 5: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties 6: In cor.test.default(y[i, ], y[j, ], method = "kendall") : Cannot compute exact p-value with ties > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/2d9px1257426225.tab") > > system("convert tmp/1aqf31257426225.ps tmp/1aqf31257426225.png") > > > proc.time() user system elapsed 0.510 0.370 0.705