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(114.08 + ,136.49 + ,129.57 + ,129.41 + ,112.95 + ,142.62 + ,130.02 + ,136.76 + ,135.31 + ,141.71 + ,132.91 + ,136.76 + ,134.31 + ,149.51 + ,138.25 + ,127.94 + ,133.03 + ,147.39 + ,142.68 + ,120.59 + ,140.11 + ,131.96 + ,139.61 + ,122.06 + ,124.69 + ,136.38 + ,138.49 + ,125.00 + ,131.68 + ,127.34 + ,140.48 + ,126.47 + ,150.95 + ,133.85 + ,137.68 + ,125.00 + ,137.26 + ,125.14 + ,135.09 + ,120.59 + ,130.51 + ,141.25 + ,129.46 + ,119.12 + ,143.15 + ,149.32 + ,128.09 + ,116.18 + ,118.01 + ,120.92 + ,128.09 + ,126.47 + ,122.56 + ,134.85 + ,130.81 + ,127.94 + ,147.97 + ,131.93 + ,130.42 + ,127.94 + ,135.74 + ,134.22 + ,127.86 + ,125.00 + ,151.62 + ,143.07 + ,125.42 + ,123.53 + ,154.82 + ,145.37 + ,126.17 + ,125.00 + ,145.59 + ,134.32 + ,128.80 + ,127.94 + ,147.12 + ,126.31 + ,127.04 + ,127.94 + ,175.86 + ,162.21 + ,127.91 + ,126.47 + ,140.66 + ,124.09 + ,130.58 + ,125.00 + ,152.69 + ,153.91 + ,135.89 + ,122.06 + ,154.38 + ,154.34 + ,134.62 + ,117.65 + ,132.45 + ,138.70 + ,134.98 + ,120.59 + ,136.44 + ,150.98 + ,136.33 + ,119.12 + ,153.24 + ,146.39 + ,135.44 + ,119.12 + ,154.11 + ,178.30 + ,134.20 + ,117.65 + ,155.93 + ,168.23 + ,137.08 + ,116.18 + ,142.53 + ,162.52 + ,140.61 + ,116.18 + ,148.73 + ,158.86 + ,138.33 + ,117.65 + ,147.73 + ,152.17 + ,139.13 + ,117.65 + ,166.79 + ,171.01 + ,140.92 + ,116.18 + ,144.30 + ,171.49 + ,143.83 + ,117.65 + ,156.07 + ,189.62 + ,143.78 + ,113.24 + ,161.70 + ,177.46 + ,142.80 + ,105.88 + ,152.10 + ,179.98 + ,145.96 + ,110.29 + ,140.45 + ,156.96 + ,144.96 + ,107.35 + ,155.56 + ,167.89 + ,147.88 + ,102.94 + ,174.53 + ,194.78 + ,151.40 + ,102.94 + ,167.16 + ,192.78 + ,156.26 + ,102.94 + ,159.48 + ,165.06 + ,155.05 + ,105.88 + ,173.22 + ,196.60 + ,156.62 + ,107.35 + ,176.13 + ,151.64 + ,156.94 + ,104.41 + ,180.31 + ,187.02 + ,165.23 + ,100.00 + ,185.84 + ,210.99 + ,167.62 + ,94.12 + ,169.43 + ,219.08 + ,165.55 + ,89.71 + ,195.25 + ,235.68 + ,165.51 + ,95.59 + ,174.99 + ,241.44 + ,167.82 + ,113.24 + ,156.42 + ,187.46 + ,159.36 + ,116.18 + ,182.08 + ,229.57 + ,152.92 + ,110.29 + ,182.00 + ,208.44 + ,141.77 + ,101.47 + ,153.28 + ,215.09 + ,135.49 + ,97.06 + ,136.72 + ,217.00 + ,143.12 + ,101.47 + ,130.19 + ,171.08 + ,140.89 + ,113.24 + ,132.04 + ,178.41 + ,136.05 + ,117.65 + ,143.89 + ,196.34 + ,138.87 + ,117.65 + ,133.38 + ,172.11 + ,140.36 + ,113.24 + ,127.98 + ,154.93 + ,145.26 + ,107.35 + ,150.45 + ,182.26 + ,149.15 + ,108.82 + ,133.55 + ,181.74 + ,149.92 + ,119.12) + ,dim=c(4 + ,61) + ,dimnames=list(c('InvoerEU' + ,'InvoerAM' + ,'USD' + ,'Werkloosh') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('InvoerEU','InvoerAM','USD','Werkloosh'),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/1ql6t1258231667.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 = 5.0281, p-value = 4.953e-07 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4415301 > 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/2shq11258231667.tab") > > system("convert tmp/1ql6t1258231667.ps tmp/1ql6t1258231667.png") > > > proc.time() user system elapsed 0.480 0.201 0.559