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.7461 + ,0.5857 + ,1.2413 + ,8.9 + ,2.86 + ,0.7775 + ,0.5858 + ,1.2758 + ,8.6 + ,2.55 + ,0.7790 + ,0.5717 + ,1.2729 + ,8.3 + ,2.27 + ,0.7744 + ,0.5945 + ,1.2695 + ,8.3 + ,2.26 + ,0.7905 + ,0.5961 + ,1.2858 + ,8.3 + ,2.57 + ,0.7719 + ,0.5973 + ,1.2741 + ,8.4 + ,3.07 + ,0.7811 + ,0.6036 + ,1.2823 + ,8.5 + ,2.76 + ,0.7557 + ,0.6096 + ,1.2588 + ,8.4 + ,2.51 + ,0.7637 + ,0.6315 + ,1.2856 + ,8.6 + ,2.87 + ,0.7595 + ,0.6262 + ,1.2619 + ,8.5 + ,3.14 + ,0.7471 + ,0.6121 + ,1.2590 + ,8.5 + ,3.11 + ,0.7615 + ,0.6326 + ,1.2865 + ,8.5 + ,3.16 + ,0.7487 + ,0.6214 + ,1.2667 + ,8.5 + ,2.47 + ,0.7389 + ,0.6274 + ,1.2505 + ,8.5 + ,2.57 + ,0.7337 + ,0.6175 + ,1.2205 + ,8.5 + ,2.89 + ,0.7510 + ,0.6208 + ,1.2220 + ,8.5 + ,2.63 + ,0.7382 + ,0.6225 + ,1.1990 + ,8.5 + ,2.38 + ,0.7159 + ,0.5889 + ,1.1583 + ,8.5 + ,1.69 + ,0.7542 + ,0.6020 + ,1.1931 + ,8.5 + ,1.96 + ,0.7636 + ,0.5932 + ,1.2028 + ,8.5 + ,2.19 + ,0.7433 + ,0.5841 + ,1.1802 + ,8.6 + ,1.87 + ,0.7658 + ,0.6000 + ,1.2084 + ,8.4 + ,1.6 + ,0.7627 + ,0.5947 + ,1.1996 + ,8.1 + ,1.63 + ,0.7480 + ,0.5891 + ,1.1870 + ,8.00 + ,1.22 + ,0.7692 + ,0.6051 + ,1.2013 + ,8.00 + ,1.21 + ,0.7850 + ,0.5960 + ,1.2120 + ,8.00 + ,1.49 + ,0.7913 + ,0.6012 + ,1.2133 + ,8.00 + ,1.64 + ,0.7720 + ,0.5957 + ,1.1866 + ,7.9 + ,1.66 + ,0.7880 + ,0.5959 + ,1.2067 + ,7.8 + ,1.77 + ,0.8070 + ,0.6049 + ,1.2240 + ,7.8 + ,1.82 + ,0.8268 + ,0.6064 + ,1.2566 + ,7.9 + ,1.78 + ,0.8244 + ,0.6137 + ,1.2608 + ,8.1 + ,1.28 + ,0.8487 + ,0.6311 + ,1.3005 + ,8.00 + ,1.29 + ,0.8572 + ,0.6258 + ,1.2955 + ,7.6 + ,1.37 + ,0.8214 + ,0.6010 + ,1.2500 + ,7.3 + ,1.12 + ,0.8827 + ,0.6232 + ,1.3158 + ,7.00 + ,1.51 + ,0.9216 + ,0.6384 + ,1.3358 + ,6.8 + ,2.24 + ,0.8865 + ,0.6014 + ,1.2817 + ,7.00 + ,2.94 + ,0.8816 + ,0.5980 + ,1.2707 + ,7.1 + ,3.09 + ,0.8884 + ,0.5987 + ,1.2595 + ,7.2 + ,3.46 + ,0.9466 + ,0.6237 + ,1.3182 + ,7.1 + ,3.64 + ,0.9180 + ,0.5813 + ,1.2665 + ,6.9 + ,4.39 + ,0.9337 + ,0.5991 + ,1.2715 + ,6.7 + ,4.15 + ,0.9559 + ,0.6160 + ,1.3041 + ,6.7 + ,5.21 + ,0.9626 + ,0.6096 + ,1.3106 + ,6.6 + ,5.8 + ,0.9434 + ,0.6051 + ,1.2911 + ,6.9 + ,5.91 + ,0.8639 + ,0.5857 + ,1.2233 + ,7.3 + ,5.39 + ,0.7996 + ,0.5565 + ,1.1438 + ,7.5 + ,5.46 + ,0.6680 + ,0.5223 + ,0.9895 + ,7.3 + ,4.72 + ,0.6572 + ,0.5091 + ,1.9903 + ,7.1 + ,3.14 + ,0.6928 + ,0.4919 + ,0.9967 + ,6.9 + ,2.63 + ,0.6438 + ,0.4995 + ,0.9708 + ,7.1 + ,2.32 + ,0.6454 + ,0.5069 + ,0.9946 + ,7.5 + ,1.93 + ,0.6873 + ,0.5190 + ,1.0441 + ,7.7 + ,0.62 + ,0.7265 + ,0.5460 + ,1.0757 + ,7.8 + ,0.6 + ,0.7912 + ,0.5648 + ,1.1461 + ,7.8 + ,-0.37 + ,0.8114 + ,0.5751 + ,1.1749 + ,7.7 + ,-1.1 + ,0.8281 + ,0.5862 + ,1.1926 + ,7.7 + ,-1.68 + ,0.8393 + ,0.5877 + ,1.2109 + ,7.8 + ,-0.78) + ,dim=c(5 + ,59) + ,dimnames=list(c('US_DOLLAR' + ,'EURO' + ,'SINGAPORE_DOLLAR' + ,'Werkloosheidsgraad_in_%' + ,'Inflatie') + ,1:59)) > y <- array(NA,dim=c(5,59),dimnames=list(c('US_DOLLAR','EURO','SINGAPORE_DOLLAR','Werkloosheidsgraad_in_%','Inflatie'),1:59)) > 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/1fuqn1257499205.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] 5 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 2.5898, p-value = 0.009603 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2316468 > 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/2cmut1257499205.tab") > > system("convert tmp/1fuqn1257499205.ps tmp/1fuqn1257499205.png") > > > proc.time() user system elapsed 0.555 0.234 1.271