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(100 + ,100 + ,100 + ,100 + ,79.53631927 + ,96.21064363 + ,97.82226485 + ,99.87129987 + ,77.14613839 + ,96.31280765 + ,94.04971502 + ,99.54459954 + ,94.99712891 + ,107.1793443 + ,91.12460521 + ,99.81189981 + ,98.11943727 + ,114.9066592 + ,93.13202153 + ,100.4851005 + ,85.46511628 + ,92.56060184 + ,93.88342812 + ,101.1385011 + ,82.48636233 + ,114.9995356 + ,92.55349954 + ,101.3662014 + ,92.01119724 + ,107.1236185 + ,94.43494835 + ,101.5147015 + ,100.97617 + ,117.7765394 + ,96.25017563 + ,101.8216018 + ,99.94257824 + ,107.3650971 + ,100.4355715 + ,102.4354024 + ,120.1909274 + ,106.2970187 + ,101.5036685 + ,102.5344025 + ,109.804766 + ,114.5072908 + ,99.39789728 + ,102.6532027 + ,84.76169968 + ,98.0031578 + ,99.68990733 + ,102.4651025 + ,92.07579673 + ,103.0649206 + ,101.6895041 + ,102.4354024 + ,109.4028137 + ,100.2879168 + ,103.6652759 + ,102.4156024 + ,109.4315245 + ,104.6066685 + ,103.0532766 + ,102.4453024 + ,109.1085271 + ,111.1544534 + ,100.9500712 + ,102.8908029 + ,135.0775194 + ,104.9874617 + ,102.345366 + ,102.8512029 + ,98.70801034 + ,109.9284852 + ,101.6472299 + ,103.3561034 + ,95.93023256 + ,111.5352466 + ,99.56809393 + ,103.7422037 + ,118.712317 + ,132.4974459 + ,95.67727392 + ,103.7224037 + ,100.796727 + ,100.3436426 + ,96.58494865 + ,104.0788041 + ,124.2750502 + ,123.0983561 + ,96.32604937 + ,104.2075042 + ,95.5211025 + ,114.2379493 + ,95.37109101 + ,103.9105039 + ,116.0134941 + ,104.569518 + ,96.00056203 + ,103.7026037 + ,107.931381 + ,109.0833101 + ,96.88367859 + ,103.960004 + ,105.9933965 + ,106.9843039 + ,94.85280372 + ,104.0986041 + ,112.3743899 + ,133.6769759 + ,92.46943974 + ,104.1481041 + ,113.5371806 + ,124.8537197 + ,93.99180173 + ,104.7124047 + ,101.0407695 + ,122.5132349 + ,93.45262168 + ,104.7223047 + ,100.0358886 + ,116.8013374 + ,92.26698759 + ,105.1975052 + ,119.3224232 + ,116.0118882 + ,90.39653498 + ,105.0688051 + ,138.4582257 + ,129.7575926 + ,90.43001228 + ,105.0589051 + ,97.10020098 + ,125.1973623 + ,91.04995327 + ,105.5044055 + ,96.16709733 + ,143.7912139 + ,89.07845784 + ,105.3757054 + ,89.80763709 + ,127.9465032 + ,89.69314509 + ,105.4747055 + ,107.0700546 + ,130.2962757 + ,87.92459054 + ,106.029106 + ,110.5871375 + ,108.4424631 + ,85.8789319 + ,107.019107 + ,99.31811657 + ,129.3675118 + ,83.20612366 + ,107.3161073 + ,131.1728395 + ,143.6797622 + ,83.85722053 + ,107.7517078 + ,114.219064 + ,131.8844618 + ,83.01393462 + ,108.5239085 + ,92.53517083 + ,117.6186496 + ,82.84508195 + ,109.3159093 + ,92.736147 + ,118.9560695 + ,78.68864276 + ,109.5634096 + ,98.21274763 + ,104.8202842 + ,77.56959675 + ,110.5435105 + ,91.06373816 + ,134.624315 + ,78.53689529 + ,111.1573112 + ,104.3927649 + ,140.401226 + ,78.55717715 + ,111.7414117 + ,89.89376974 + ,143.8005015 + ,77.4761291 + ,111.0583111 + ,93.69796153 + ,153.4317823 + ,81.58931659 + ,111.2365112 + ,91.50875682 + ,153.2924677 + ,85.02428326 + ,111.038511 + ,78.22279644 + ,127.3149438 + ,91.71290159 + ,110.3752104 + ,114.9511915 + ,153.5525216 + ,95.96293061 + ,110.1376101 + ,101.8446741 + ,136.9276493 + ,90.84689022 + ,110.2465102 + ,86.76428366 + ,131.7730101 + ,92.28788036 + ,110.6227106 + ,82.23514212 + ,144.3391845 + ,95.56511274 + ,109.98911 + ,81.04364054 + ,107.4208229 + ,93.62452884 + ,110.2168102 + ,77.06000574 + ,113.6249652 + ,92.63071726 + ,110.1376101 + ,87.80505312 + ,124.2221603 + ,89.50914211 + ,109.9297099 + ,81.50301464 + ,102.0618557 + ,87.17171779 + ,109.8604099 + ,78.32328452 + ,96.36853348 + ,86.72624975 + ,110.1970102 + ,80.12489233 + ,111.6838488 + ,85.63212844 + ,109.9099099) + ,dim=c(4 + ,60) + ,dimnames=list(c('Import' + ,'export' + ,'wisselkoers' + ,'consumptieprijs') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Import','export','wisselkoers','consumptieprijs'),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/1xouw1257766510.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 = 1.2756, p-value = 0.2021 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1129944 > 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/2zq261257766510.tab") > > system("convert tmp/1xouw1257766510.ps tmp/1xouw1257766510.png") > > > proc.time() user system elapsed 0.510 0.219 1.173