R version 2.7.2 (2008-08-25) Copyright (C) 2008 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(109.57 + ,156.4 + ,377.2 + ,107.08 + ,143.1 + ,332.2 + ,110.33 + ,148.9 + ,364.8 + ,110.36 + ,134 + ,352.4 + ,106.5 + ,118 + ,341.6 + ,104.3 + ,125.3 + ,298.2 + ,107.21 + ,138 + ,355.3 + ,109.34 + ,114 + ,330.9 + ,108.2 + ,109.9 + ,314.5 + ,109.86 + ,151.5 + ,418.9 + ,108.68 + ,129.1 + ,433.2 + ,113.38 + ,121.7 + ,367 + ,117.12 + ,126.1 + ,422.9 + ,116.23 + ,114.3 + ,352.1 + ,114.75 + ,124.7 + ,419.8 + ,115.81 + ,111.9 + ,432.7 + ,115.86 + ,120 + ,414.2 + ,117.8 + ,119.5 + ,387.7 + ,117.11 + ,137.8 + ,297.2 + ,116.31 + ,105.4 + ,357.4 + ,118.38 + ,135.4 + ,384.2 + ,121.57 + ,182.5 + ,425.2 + ,121.65 + ,129.6 + ,385.3 + ,124.2 + ,147.5 + ,355.4 + ,126.12 + ,128.9 + ,409.8 + ,128.6 + ,119.7 + ,421.2 + ,128.16 + ,149.4 + ,421.8 + ,130.12 + ,136.6 + ,464.2 + ,135.83 + ,118.6 + ,494 + ,138.05 + ,121.4 + ,404.2 + ,134.99 + ,138.9 + ,411.4 + ,132.38 + ,109.5 + ,403.4 + ,128.94 + ,131.7 + ,403.3 + ,128.12 + ,160.3 + ,520.9 + ,127.84 + ,138.1 + ,439.8 + ,132.43 + ,136.7 + ,434.8 + ,134.13 + ,126.6 + ,476.5 + ,134.78 + ,138 + ,454.3 + ,133.13 + ,152 + ,522 + ,129.08 + ,137 + ,498.4 + ,134.48 + ,134.9 + ,439.9 + ,132.86 + ,154.4 + ,450.7 + ,134.08 + ,145.2 + ,447.1 + ,134.54 + ,133.1 + ,451.3 + ,134.51 + ,169.6 + ,466.8 + ,135.97 + ,159.3 + ,498 + ,136.09 + ,124.9 + ,533.6 + ,139.14 + ,138.1 + ,451.9 + ,135.63 + ,162.5 + ,477.1 + ,136.55 + ,136.6 + ,410.4 + ,138.83 + ,148.1 + ,469.5 + ,138.84 + ,142 + ,485.4 + ,135.37 + ,137.9 + ,406.7 + ,132.22 + ,152.5 + ,439.7 + ,134.75 + ,182.8 + ,412.2 + ,135.98 + ,135.3 + ,440.2 + ,136.06 + ,141.8 + ,411.1 + ,138.05 + ,151.7 + ,477.7 + ,139.59 + ,140.6 + ,463.2 + ,140.58 + ,128 + ,320.5) + ,dim=c(3 + ,60) + ,dimnames=list(c('Wisselkoers' + ,'Uitvoer' + ,'Invoer') + ,1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('Wisselkoers','Uitvoer','Invoer'),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/1j3ee1226563529.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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 2.2069, p-value = 0.02732 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1957014 > 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/2ddim1226563529.tab") > > system("convert tmp/1j3ee1226563529.ps tmp/1j3ee1226563529.png") > > > proc.time() user system elapsed 0.687 0.201 3.692