R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(0.6348 + ,1.5291 + ,1.4098 + ,1.6891 + ,0.634 + ,1.5358 + ,1.4027 + ,1.7236 + ,0.62915 + ,1.5355 + ,1.4167 + ,1.8072 + ,0.62168 + ,1.5287 + ,1.3903 + ,1.7847 + ,0.1328 + ,1.5334 + ,1.3473 + ,1.6813 + ,0.6089 + ,1.5225 + ,1.3016 + ,1.6469 + ,0.60857 + ,1.5135 + ,1.3153 + ,1.689 + ,0.62672 + ,1.5144 + ,1.3857 + ,1.7169 + ,0.62291 + ,1.4913 + ,1.426 + ,1.8036 + ,0.62393 + ,1.4793 + ,1.4224 + ,1.7955 + ,0.61838 + ,1.4663 + ,1.4153 + ,1.7172 + ,0.62012 + ,1.4749 + ,1.4075 + ,1.7348 + ,0.61659 + ,1.4745 + ,1.4135 + ,1.7094 + ,0.6116 + ,1.4775 + ,1.388 + ,1.6963 + ,0.61573 + ,1.4678 + ,1.3903 + ,1.6695 + ,0.61407 + ,1.4658 + ,1.4008 + ,1.6537 + ,0.62823 + ,1.4572 + ,1.421 + ,1.6662 + ,0.64405 + ,1.4721 + ,1.4627 + ,1.6793 + ,0.6387 + ,1.4624 + ,1.5321 + ,1.7922 + ,0.63633 + ,1.4636 + ,1.5333 + ,1.8045 + ,0.63059 + ,1.4649 + ,1.5434 + ,1.7927 + ,0.62994 + ,1.465 + ,1.5481 + ,1.7831 + ,0.63709 + ,1.4673 + ,1.5735 + ,1.7847 + ,0.64217 + ,1.4679 + ,1.5872 + ,1.8076 + ,0.65711 + ,1.4621 + ,1.6364 + ,1.8218 + ,0.66977 + ,1.4674 + ,1.6299 + ,1.8112 + ,0.68255 + ,1.4695 + ,1.5943 + ,1.795 + ,0.68902 + ,1.4964 + ,1.5851 + ,1.7813 + ,0.71322 + ,1.5155 + ,1.6016 + ,1.7866 + ,0.70224 + ,1.5411 + ,1.5798 + ,1.7552 + ,0.70045 + ,1.5476 + ,1.5694 + ,1.7184 + ,0.69919 + ,1.54 + ,1.557 + ,1.7114 + ,0.69693 + ,1.5474 + ,1.533 + ,1.6967 + ,0.69763 + ,1.5485 + ,1.5489 + ,1.6867 + ,0.69278 + ,1.559 + ,1.5361 + ,1.6337 + ,0.70196 + ,1.5544 + ,1.6131 + ,1.6626 + ,0.69215 + ,1.5657 + ,1.6346 + ,1.6374 + ,0.6769 + ,1.5734 + ,1.6817 + ,1.626 + ,0.67124 + ,1.567 + ,1.6314 + ,1.637 + ,0.66532 + ,1.5547 + ,1.6068 + ,1.6142 + ,0.67157 + ,1.54 + ,1.6541 + ,1.7033 + ,0.66428 + ,1.5192 + ,1.6492 + ,1.7483 + ,0.66576 + ,1.527 + ,1.622 + ,1.7135 + ,0.66942 + ,1.5387 + ,1.6007 + ,1.7147 + ,0.6813 + ,1.5431 + ,1.5767 + ,1.7396 + ,0.69144 + ,1.5426 + ,1.56 + ,1.7049 + ,0.69862 + ,1.5216 + ,1.554 + ,1.6867 + ,0.695 + ,1.5364 + ,1.6333 + ,1.7462 + ,0.69867 + ,1.5469 + ,1.606 + ,1.7147 + ,0.68968 + ,1.5501 + ,1.6128 + ,1.667 + ,0.69233 + ,1.5494 + ,1.6064 + ,1.6806 + ,0.68293 + ,1.5475 + ,1.5991 + ,1.6738 + ,0.68399 + ,1.5448 + ,1.5942 + ,1.6571 + ,0.66895 + ,1.5391 + ,1.5111 + ,1.5875 + ,0.68756 + ,1.5578 + ,1.473 + ,1.6002 + ,0.68527 + ,1.5528 + ,1.4819 + ,1.6144 + ,0.6776 + ,1.5496 + ,1.4452 + ,1.6009 + ,0.68137 + ,1.549 + ,1.4149 + ,1.5937 + ,0.67933 + ,1.5449 + ,1.3944 + ,1.603 + ,0.67922 + ,1.5479 + ,1.3778 + ,1.5979) + ,dim=c(4 + ,60) + ,dimnames=list(c('Britse_Pond' + ,'Zwitserse_Frank' + ,'Canadese_Dollar' + ,'Australische_Dollar') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Britse_Pond','Zwitserse_Frank','Canadese_Dollar','Australische_Dollar'),1:60)) > 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/rcomp/tmp/1jvyu1257771581.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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 = 4.4583, p-value = 8.263e-06 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3950269 > 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/rcomp/tmp/2u4n51257771581.tab") > > system("convert tmp/1jvyu1257771581.ps tmp/1jvyu1257771581.png") > > > proc.time() user system elapsed 0.508 0.226 0.565