R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(10.137 + ,0.8552 + ,1.5 + ,4.76 + ,9.984 + ,0.8564 + ,1.4 + ,4.83 + ,9.732 + ,0.8973 + ,1.6 + ,4.81 + ,9.103 + ,0.9383 + ,1.6 + ,4.77 + ,9.155 + ,0.9217 + ,1.6 + ,4.77 + ,9.308 + ,0.9095 + ,1.4 + ,4.77 + ,9.394 + ,0.892 + ,1.7 + ,4.79 + ,9.948 + ,0.8742 + ,1.8 + ,4.63 + ,10.177 + ,0.8532 + ,1.9 + ,4.53 + ,10.002 + ,0.8607 + ,2.2 + ,4.52 + ,9.728 + ,0.9005 + ,2.1 + ,4.51 + ,10.002 + ,0.9111 + ,2.4 + ,4.06 + ,10.063 + ,0.9059 + ,2.6 + ,3.76 + ,10.018 + ,0.8883 + ,2.8 + ,3.48 + ,9.96 + ,0.8924 + ,2.7 + ,3.35 + ,10.236 + ,0.8833 + ,2.6 + ,3.31 + ,10.893 + ,0.87 + ,2.9 + ,3.3 + ,10.756 + ,0.8758 + ,2.8 + ,3.3 + ,10.94 + ,0.8858 + ,2.2 + ,3.3 + ,10.997 + ,0.917 + ,2.2 + ,3.32 + ,10.827 + ,0.9554 + ,2.2 + ,3.34 + ,10.166 + ,0.9922 + ,2 + ,3.32 + ,10.186 + ,0.9778 + ,2 + ,3.29 + ,10.457 + ,0.9808 + ,1.7 + ,3.29 + ,10.368 + ,0.9811 + ,1.4 + ,3.29 + ,10.244 + ,1.0014 + ,1.3 + ,3.28 + ,10.511 + ,1.0183 + ,1.4 + ,3.02 + ,10.812 + ,1.0622 + ,1.3 + ,2.84 + ,10.738 + ,1.0773 + ,1.3 + ,2.78 + ,10.171 + ,1.0807 + ,1.4 + ,2.63 + ,9.721 + ,1.0848 + ,2 + ,2.54 + ,9.897 + ,1.1582 + ,1.7 + ,2.56 + ,9.828 + ,1.1663 + ,1.8 + ,2.19 + ,9.924 + ,1.1372 + ,1.7 + ,2.09 + ,10.371 + ,1.1139 + ,1.6 + ,2.06 + ,10.846 + ,1.1222 + ,1.7 + ,2.08 + ,10.413 + ,1.1692 + ,1.9 + ,2.05 + ,10.709 + ,1.1702 + ,1.8 + ,2.03 + ,10.662 + ,1.2286 + ,1.7 + ,2.04 + ,10.57 + ,1.2613 + ,1.6 + ,2.03 + ,10.297 + ,1.2646 + ,1.8 + ,2.01 + ,10.635 + ,1.2262 + ,1.6 + ,2.01 + ,10.872 + ,1.1985 + ,1.5 + ,2.01 + ,10.296 + ,1.2007 + ,1.5 + ,2.01 + ,10.383 + ,1.2138 + ,1.3 + ,2.01 + ,10.431 + ,1.2266 + ,1.4 + ,2.01 + ,10.574 + ,1.2176 + ,1.4 + ,2.02 + ,10.653 + ,1.2218 + ,1.3 + ,2.02 + ,10.805 + ,1.249 + ,1.3 + ,2.03 + ,10.872 + ,1.2991 + ,1.2 + ,2.05 + ,10.625 + ,1.3408 + ,1.1 + ,2.08 + ,10.407 + ,1.3119 + ,1.4 + ,2.07 + ,10.463 + ,1.3014 + ,1.2 + ,2.06 + ,10.556 + ,1.3201 + ,1.5 + ,2.05 + ,10.646 + ,1.2938 + ,1.1 + ,2.05 + ,10.702 + ,1.2694 + ,1.3 + ,2.05 + ,11.353 + ,1.2165 + ,1.5 + ,2.05 + ,11.346 + ,1.2037 + ,1.1 + ,2.05 + ,11.451 + ,1.2292 + ,1.4 + ,2.06 + ,11.964 + ,1.2256 + ,1.3 + ,2.06 + ,12.574 + ,1.2015 + ,1.5 + ,2.07 + ,13.031 + ,1.1786 + ,1.6 + ,2.07 + ,13.812 + ,1.1856 + ,1.7 + ,2.3 + ,14.544 + ,1.2103 + ,1.1 + ,2.31 + ,14.931 + ,1.1938 + ,1.6 + ,2.31 + ,14.886 + ,1.202 + ,1.3 + ,2.53 + ,16.005 + ,1.2271 + ,1.7 + ,2.58 + ,17.064 + ,1.277 + ,1.6 + ,2.59 + ,15.168 + ,1.265 + ,1.7 + ,2.73 + ,16.05 + ,1.2684 + ,1.9 + ,2.82 + ,15.839 + ,1.2811 + ,1.8 + ,3 + ,15.137 + ,1.2727 + ,1.9 + ,3.04 + ,14.954 + ,1.2611 + ,1.6 + ,3.23 + ,15.648 + ,1.2881 + ,1.5 + ,3.32 + ,15.305 + ,1.3213 + ,1.6 + ,3.49 + ,15.579 + ,1.2999 + ,1.6 + ,3.57 + ,16.348 + ,1.3074 + ,1.7 + ,3.56 + ,15.928 + ,1.3242 + ,2 + ,3.72 + ,16.171 + ,1.3516 + ,2 + ,3.82 + ,15.937 + ,1.3511 + ,1.9 + ,3.82 + ,15.713 + ,1.3419 + ,1.7 + ,3.98 + ,15.594 + ,1.3716 + ,1.8 + ,4.06 + ,15.683 + ,1.3622 + ,1.9 + ,4.08 + ,16.438 + ,1.3896 + ,1.7 + ,4.19 + ,17.032 + ,1.4227 + ,2 + ,4.16) + ,dim=c(4 + ,85) + ,dimnames=list(c('Goudprijs' + ,'Dollarkoers' + ,'Inflatie' + ,'Rentevoeten') + ,1:85)) > y <- array(NA,dim=c(4,85),dimnames=list(c('Goudprijs','Dollarkoers','Inflatie','Rentevoeten'),1:85)) > 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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/1ij721196412562.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 > 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 = 6.8092, p-value = 9.813e-12 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5026618 > 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/2lyhb1196412562.tab") > > system("convert tmp/1ij721196412562.ps tmp/1ij721196412562.png") > > > proc.time() user system elapsed 0.766 0.243 0.925