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(0.527 + ,4.79 + ,0.7461 + ,0.5857 + ,2.86 + ,24710.92 + ,0.472 + ,5.95 + ,0.7775 + ,0.5858 + ,2.55 + ,23983.59 + ,0 + ,5.46 + ,0.779 + ,0.5717 + ,2.27 + ,24434.12 + ,0.052 + ,5.75 + ,0.7744 + ,0.5945 + ,2.26 + ,23939.23 + ,0.313 + ,5.15 + ,0.7905 + ,0.5961 + ,2.57 + ,24290.02 + ,0.364 + ,4.96 + ,0.7719 + ,0.5973 + ,3.07 + ,24117.63 + ,0.363 + ,5.28 + ,0.7811 + ,0.6036 + ,2.76 + ,23724.64 + ,-0.155 + ,5.73 + ,0.7557 + ,0.6096 + ,2.51 + ,22989.44 + ,0.052 + ,5.75 + ,0.7637 + ,0.6315 + ,2.87 + ,23716.86 + ,0.568 + ,5.88 + ,0.7595 + ,0.6262 + ,3.14 + ,25058.83 + ,0.668 + ,6.3 + ,0.7471 + ,0.6121 + ,3.11 + ,25059.00 + ,1.378 + ,6.74 + ,0.7615 + ,0.6326 + ,3.16 + ,23579.18 + ,0.252 + ,6.75 + ,0.7487 + ,0.6214 + ,2.47 + ,24209.03 + ,-0.402 + ,7.34 + ,0.7389 + ,0.6274 + ,2.57 + ,24173.67 + ,-0.05 + ,6.64 + ,0.7337 + ,0.6175 + ,2.89 + ,24706.39 + ,0.555 + ,6.62 + ,0.751 + ,0.6208 + ,2.63 + ,24522.12 + ,0.05 + ,6.32 + ,0.7382 + ,0.6225 + ,2.38 + ,24766.15 + ,0.15 + ,5.32 + ,0.7159 + ,0.5889 + ,1.69 + ,25940.04 + ,0.45 + ,5.68 + ,0.7542 + ,0.602 + ,1.96 + ,24985.78 + ,0.299 + ,6.18 + ,0.7636 + ,0.5932 + ,2.19 + ,24788.00 + ,0.199 + ,5.02 + ,0.7433 + ,0.5841 + ,1.87 + ,26544.56 + ,0.496 + ,2.1 + ,0.7658 + ,0.6 + ,1.6 + ,28019.08 + ,0.444 + ,4 + ,0.7627 + ,0.5947 + ,1.63 + ,27285.71 + ,-0.393 + ,3 + ,0.748 + ,0.5891 + ,1.22 + ,29161.16 + ,-0.444 + ,4.73 + ,0.7692 + ,0.6051 + ,1.21 + ,28357.73 + ,0.198 + ,5.14 + ,0.785 + ,0.596 + ,1.49 + ,27979.91 + ,0.494 + ,5.81 + ,0.7913 + ,0.6012 + ,1.64 + ,27543.95 + ,0.133 + ,6.24 + ,0.772 + ,0.5957 + ,1.66 + ,27397.53 + ,0.388 + ,4.49 + ,0.788 + ,0.5959 + ,1.77 + ,27623.59 + ,0.484 + ,4.22 + ,0.807 + ,0.6049 + ,1.82 + ,27736.07 + ,0.278 + ,4.88 + ,0.8268 + ,0.6064 + ,1.78 + ,27803.79 + ,0.369 + ,5.18 + ,0.8244 + ,0.6137 + ,1.28 + ,27779.55 + ,0.165 + ,5.19 + ,0.8487 + ,0.6311 + ,1.29 + ,27524.13 + ,0.155 + ,5.06 + ,0.8572 + ,0.6258 + ,1.37 + ,27582.72 + ,0.087 + ,4.65 + ,0.8214 + ,0.601 + ,1.12 + ,28638.95 + ,0.414 + ,4.83 + ,0.8827 + ,0.6232 + ,1.51 + ,28825.78 + ,0.36 + ,4.6 + ,0.9216 + ,0.6384 + ,2.24 + ,30132.61 + ,0.975 + ,4.72 + ,0.8865 + ,0.6014 + ,2.94 + ,29326.85 + ,0.27 + ,4.33 + ,0.8816 + ,0.598 + ,3.09 + ,29075.62 + ,0.359 + ,4.97 + ,0.8884 + ,0.5987 + ,3.46 + ,28230.63 + ,0.169 + ,5.37 + ,0.9466 + ,0.6237 + ,3.64 + ,28118.36 + ,0.381 + ,4.19 + ,0.918 + ,0.5813 + ,4.39 + ,28173.29 + ,0.154 + ,4.54 + ,0.9337 + ,0.5991 + ,4.15 + ,27396.91 + ,0.486 + ,5.82 + ,0.9559 + ,0.616 + ,5.21 + ,24578.55 + ,0.925 + ,5.49 + ,0.9626 + ,0.6096 + ,5.8 + ,24504.77 + ,0.728 + ,3.28 + ,0.9434 + ,0.6051 + ,5.91 + ,27582.37 + ,-0.014 + ,5.11 + ,0.8639 + ,0.5857 + ,5.39 + ,26920.31 + ,0.046 + ,6.24 + ,0.7996 + ,0.5565 + ,5.46 + ,25426.68 + ,-0.819 + ,6.41 + ,0.668 + ,0.5223 + ,4.72 + ,25390.80 + ,-1.674 + ,6.43 + ,0.6572 + ,0.5091 + ,3.14 + ,25041.16 + ,-0.788 + ,8.42 + ,0.6928 + ,0.4919 + ,2.63 + ,22769.42 + ,0.279 + ,8.23 + ,0.6438 + ,0.4995 + ,2.32 + ,22921.89 + ,0.396 + ,3.17 + ,0.6454 + ,0.5069 + ,1.93 + ,26267.63 + ,-0.141 + ,2.72 + ,0.6873 + ,0.519 + ,0.62 + ,27364.67 + ,-0.019 + ,3 + ,0.7265 + ,0.546 + ,0.6 + ,28382.59 + ,0.099 + ,3.47 + ,0.7912 + ,0.5648 + ,-0.37 + ,29132.81 + ,0.742 + ,3.88 + ,0.8114 + ,0.5751 + ,-1.1 + ,28214.51 + ,0.005 + ,3.43 + ,0.8281 + ,0.5862 + ,-1.68 + ,28865.73 + ,0.448 + ,4.06 + ,0.8393 + ,0.5877 + ,-0.78 + ,24405.35) + ,dim=c(6 + ,59) + ,dimnames=list(c('Amerikaanse_inflatie' + ,'Interestvoet_auto' + ,'USDOLLAR' + ,'EURO' + ,'Inflatie_België' + ,'Autolening_financieringsbedrag') + ,1:59)) > y <- array(NA,dim=c(6,59),dimnames=list(c('Amerikaanse_inflatie','Interestvoet_auto','USDOLLAR','EURO','Inflatie_België','Autolening_financieringsbedrag'),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/freestat/rcomp/tmp/127951257789029.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] 6 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -1.2688, p-value = 0.2045 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1135167 > 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/2vtrg1257789029.tab") > > system("convert tmp/127951257789029.ps tmp/127951257789029.png") > > > proc.time() user system elapsed 0.915 0.368 1.000