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(2 + ,1.249 + ,10800 + ,17872 + ,2 + ,1.2991 + ,10642 + ,17420.4 + ,2 + ,1.3408 + ,10269 + ,16704.4 + ,2 + ,1.3119 + ,10189 + ,15991.2 + ,2 + ,1.3014 + ,9876 + ,15583.6 + ,2 + ,1.3201 + ,10164 + ,19123.5 + ,2 + ,1.2938 + ,9906 + ,17838.7 + ,2 + ,1.2694 + ,10003 + ,17209.4 + ,2 + ,1.2165 + ,10564 + ,18586.5 + ,2 + ,1.2037 + ,10221 + ,16258.1 + ,2 + ,1.2292 + ,10052 + ,15141.6 + ,2 + ,1.2256 + ,10512 + ,19202.1 + ,2 + ,1.2015 + ,10573 + ,17746.5 + ,2 + ,1.1786 + ,10821 + ,19090.1 + ,2.21 + ,1.1856 + ,10167 + ,18040.3 + ,2.25 + ,1.2103 + ,10901 + ,17515.5 + ,2.25 + ,1.1938 + ,10896 + ,17751.8 + ,2.45 + ,1.202 + ,10934 + ,21072.4 + ,2.5 + ,1.2271 + ,11059 + ,17170 + ,2.5 + ,1.277 + ,10513 + ,19439.5 + ,2.64 + ,1.265 + ,10270 + ,19795.4 + ,2.75 + ,1.2684 + ,10399 + ,17574.9 + ,2.93 + ,1.2811 + ,10740 + ,16165.4 + ,3 + ,1.2727 + ,10263 + ,19464.6 + ,3.17 + ,1.2611 + ,9883 + ,19932.1 + ,3.25 + ,1.2881 + ,10204 + ,19961.2 + ,3.39 + ,1.3213 + ,10201 + ,17343.4 + ,3.5 + ,1.2999 + ,10416 + ,18924.2 + ,3.5 + ,1.3074 + ,10557 + ,18574.1 + ,3.65 + ,1.3242 + ,10166 + ,21350.6 + ,3.75 + ,1.3516 + ,10066 + ,18594.6 + ,3.75 + ,1.3511 + ,10117 + ,19832.1 + ,3.9 + ,1.3419 + ,9973 + ,20844.4 + ,4 + ,1.3716 + ,10360 + ,19640.2 + ,4 + ,1.3622 + ,10133 + ,17735.4 + ,4 + ,1.3896 + ,10667 + ,19813.6 + ,4 + ,1.4227 + ,10883 + ,22160 + ,4 + ,1.4684 + ,10794 + ,20664.3 + ,4 + ,1.457 + ,11212 + ,17877.4 + ,4 + ,1.4718 + ,11242 + ,20906.5 + ,4 + ,1.4748 + ,11483 + ,21164.1 + ,4 + ,1.5527 + ,11106 + ,21374.4 + ,4 + ,1.575 + ,11019 + ,22952.3 + ,4 + ,1.5557 + ,10767 + ,21343.5 + ,4 + ,1.5553 + ,10577 + ,23899.3 + ,4.18 + ,1.577 + ,10859 + ,22392.9 + ,4.25 + ,1.4975 + ,10575 + ,18274.1 + ,4.25 + ,1.4369 + ,10680 + ,22786.7 + ,3.97 + ,1.3322 + ,10926 + ,22321.5 + ,3.42 + ,1.2732 + ,11781 + ,17842.2 + ,2.75 + ,1.3449 + ,11241 + ,16373.5 + ,2.31 + ,1.3239 + ,12347 + ,15933.8 + ,2 + ,1.2785 + ,12699 + ,16446.1 + ,1.66 + ,1.305 + ,12214 + ,17729 + ,1.31 + ,1.319 + ,12066 + ,16643 + ,1.09 + ,1.365 + ,12085 + ,16196.7 + ,1 + ,1.4016 + ,11894 + ,18252.1 + ,1 + ,1.4088 + ,11793 + ,17570.4 + ,1 + ,1.4268 + ,15567 + ,15836.8 + ,1 + ,1.4562 + ,16135 + ,15836.8) + ,dim=c(4 + ,60) + ,dimnames=list(c('Rente' + ,'Wisselkoers' + ,'Reserves' + ,'Uitvoer') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Rente','Wisselkoers','Reserves','Uitvoer'),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/1jo2c1257753383.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.2455, p-value = 2.181e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3920038 > 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/2fhxq1257753383.tab") > > system("convert tmp/1jo2c1257753383.ps tmp/1jo2c1257753383.png") > > > proc.time() user system elapsed 0.495 0.213 0.670