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(11.663 + ,9.828 + ,1.5 + ,101.09 + ,11.372 + ,9.924 + ,1.4 + ,102.71 + ,11.139 + ,10.371 + ,1.6 + ,102.11 + ,11.222 + ,10.846 + ,1.7 + ,101.68 + ,11.692 + ,10.413 + ,1.4 + ,101.7 + ,11.702 + ,10.709 + ,1.8 + ,101.53 + ,12.286 + ,10.662 + ,1.7 + ,101.76 + ,12.613 + ,10.570 + ,1.4 + ,101.15 + ,12.646 + ,10.297 + ,1.2 + ,100.92 + ,12.262 + ,10.635 + ,1 + ,100.73 + ,11.985 + ,10.872 + ,1.7 + ,100.55 + ,12.007 + ,10.296 + ,2.4 + ,102.15 + ,12.138 + ,10.383 + ,2 + ,100.79 + ,12.266 + ,10.431 + ,2.1 + ,99.93 + ,12.176 + ,10.574 + ,2 + ,100.03 + ,12.218 + ,10.653 + ,1.8 + ,100.25 + ,1.249 + ,10.805 + ,2.7 + ,99.6 + ,12.991 + ,10.872 + ,2.3 + ,100.16 + ,13.408 + ,10.625 + ,1.9 + ,100.49 + ,13.119 + ,10.407 + ,2 + ,99.72 + ,13.014 + ,10.463 + ,2.3 + ,100.14 + ,13.201 + ,10.556 + ,2.8 + ,98.48 + ,12.938 + ,10.646 + ,2.4 + ,100.38 + ,12.694 + ,10.702 + ,2.3 + ,101.45 + ,12.165 + ,11.353 + ,2.7 + ,98.42 + ,12.037 + ,11.346 + ,2.7 + ,98.6 + ,12.292 + ,11.451 + ,2.9 + ,100.06 + ,12.256 + ,11.964 + ,3 + ,98.62 + ,12.015 + ,12.574 + ,2.2 + ,100.84 + ,11.786 + ,13.031 + ,2.3 + ,100.02 + ,11.856 + ,13.812 + ,2.8 + ,97.95 + ,12.103 + ,14.544 + ,2.8 + ,98.32 + ,11.938 + ,14.931 + ,2.8 + ,98.27 + ,1.202 + ,14.886 + ,2.2 + ,97.22 + ,12.271 + ,16.005 + ,2.6 + ,99.28 + ,1.277 + ,17.064 + ,2.8 + ,100.38 + ,1.265 + ,15.168 + ,2.5 + ,99.02 + ,12.684 + ,16.050 + ,2.4 + ,100.32 + ,12.811 + ,15.839 + ,2.3 + ,99.81 + ,12.727 + ,15.137 + ,1.9 + ,100.6 + ,12.611 + ,14.954 + ,1.7 + ,101.19 + ,12.881 + ,15.648 + ,2 + ,100.47 + ,13.213 + ,15.305 + ,2.1 + ,101.77 + ,12.999 + ,15.579 + ,1.7 + ,102.32 + ,13.074 + ,16.348 + ,1.8 + ,102.39 + ,13.242 + ,15.928 + ,1.8 + ,101.16 + ,13.516 + ,16.171 + ,1.8 + ,100.63 + ,13.511 + ,15.937 + ,1.3 + ,101.48 + ,13.419 + ,15.713 + ,1.3 + ,101.44 + ,13.716 + ,15.594 + ,1.3 + ,100.09 + ,13.622 + ,15.683 + ,1.2 + ,100.7 + ,13.896 + ,16.438 + ,1.4 + ,100.78 + ,14.227 + ,17.032 + ,2.2 + ,99.81 + ,14.684 + ,17.696 + ,2.9 + ,98.45 + ,1.457 + ,17.745 + ,3.1 + ,98.49 + ,14.718 + ,19.394 + ,3.5 + ,97.48 + ,14.748 + ,20.148 + ,3.6 + ,97.91 + ,15.527 + ,20.108 + ,4.4 + ,96.94 + ,15.751 + ,18.584 + ,4.1 + ,98.53 + ,15.557 + ,18.441 + ,5.1 + ,96.82 + ,15.553 + ,18.391 + ,5.8 + ,95.76) + ,dim=c(4 + ,61) + ,dimnames=list(c('Wisselkoers' + ,'Goudkoers' + ,'Inflatie' + ,'Ruilvoet') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('Wisselkoers','Goudkoers','Inflatie','Ruilvoet'),1:61)) > 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/195ce1261231538.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.4121, p-value = 1.024e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3875376 > 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/25igg1261231538.tab") > > try(system("convert tmp/195ce1261231538.ps tmp/195ce1261231538.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.488 0.211 0.650