R version 2.8.0 (2008-10-20) 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(519 + ,100.03 + ,103.27 + ,517 + ,100.49 + ,100.87 + ,510 + ,108.76 + ,107.8 + ,509 + ,105.28 + ,104.99 + ,501 + ,104.55 + ,100.76 + ,507 + ,108.91 + ,104.46 + ,569 + ,105.83 + ,100.62 + ,580 + ,82.12 + ,87.84 + ,578 + ,113.71 + ,107.31 + ,565 + ,117.53 + ,115.61 + ,547 + ,104.75 + ,103.43 + ,555 + ,104.3 + ,109.93 + ,562 + ,102.82 + ,104.43 + ,561 + ,106.86 + ,106.69 + ,555 + ,123.1 + ,123.1 + ,544 + ,112.02 + ,109.42 + ,537 + ,103.66 + ,101.46 + ,543 + ,121.78 + ,124.48 + ,594 + ,107.81 + ,101.49 + ,611 + ,93.54 + ,100.46 + ,613 + ,119.41 + ,115.51 + ,611 + ,117.99 + ,113.37 + ,594 + ,116.82 + ,115.4 + ,595 + ,112.62 + ,118.2 + ,591 + ,105.76 + ,106.82 + ,589 + ,107.86 + ,110.17 + ,584 + ,122.06 + ,119.91 + ,573 + ,114.29 + ,112.31 + ,567 + ,109.95 + ,110.62 + ,569 + ,119.99 + ,120.37 + ,621 + ,103.77 + ,97.94 + ,629 + ,96.02 + ,103.02 + ,628 + ,120.83 + ,116.36 + ,612 + ,110.14 + ,108.51 + ,595 + ,119.77 + ,122.54 + ,597 + ,113.61 + ,121.32 + ,593 + ,106.83 + ,112.25 + ,590 + ,108 + ,109.89 + ,580 + ,126.39 + ,129.58 + ,574 + ,105.09 + ,107.2 + ,573 + ,118.95 + ,118.68 + ,573 + ,120.6 + ,118.25 + ,620 + ,106.07 + ,102.67 + ,626 + ,96.59 + ,104.19 + ,620 + ,118.74 + ,117.74 + ,588 + ,121.88 + ,123.3 + ,566 + ,120.89 + ,122.2 + ,557 + ,105.66 + ,112.71 + ,561 + ,113.76 + ,118.53 + ,549 + ,111.92 + ,115.32 + ,532 + ,127.19 + ,127.36 + ,526 + ,109.19 + ,110.45 + ,511 + ,118.05 + ,122.22 + ,499 + ,123.23 + ,123.39 + ,555 + ,114.68 + ,116.2 + ,565 + ,104.57 + ,109.22 + ,542 + ,115.73 + ,116.98 + ,527 + ,129.87 + ,132.89 + ,510 + ,120.31 + ,125.24 + ,514 + ,104.23 + ,115.68 + ,517 + ,123.92 + ,129.28 + ,508 + ,124.1 + ,122.72 + ,493 + ,125.61 + ,128.83 + ,490 + ,133.91 + ,137.79 + ,469 + ,124.47 + ,123.72 + ,478 + ,129.64 + ,130.13 + ,528 + ,128.58 + ,130.4 + ,534 + ,103.55 + ,114.05 + ,518 + ,129.57 + ,134.22) + ,dim=c(3 + ,69) + ,dimnames=list(c('X' + ,'Y' + ,'Z') + ,1:69)) > y <- array(NA,dim=c(3,69),dimnames=list(c('X','Y','Z'),1:69)) > 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/html/freestat/rcomp/tmp/1f2ro1229692109.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) > dev.off() null device 1 > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -2.1034, p-value = 0.03543 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1736537 > 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) + } + } > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/23ise1229692109.tab") > > system("convert tmp/1f2ro1229692109.ps tmp/1f2ro1229692109.png") > > > proc.time() user system elapsed 0.623 0.259 0.687