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(1.0137 + ,89.97 + ,0.9834 + ,99.8 + ,0.9643 + ,112.99 + ,0.947 + ,93.69 + ,0.906 + ,108.02 + ,0.9492 + ,99.11 + ,0.9397 + ,94.33 + ,0.9041 + ,83.75 + ,0.8721 + ,106.37 + ,0.8552 + ,109.63 + ,0.8564 + ,105.5 + ,0.8973 + ,96.13 + ,0.9383 + ,102.48 + ,0.9217 + ,101.37 + ,0.9095 + ,112.76 + ,0.892 + ,95.57 + ,0.8742 + ,102.81 + ,0.8532 + ,104.13 + ,0.8607 + ,97.52 + ,0.9005 + ,85.29 + ,0.9111 + ,101.01 + ,0.9059 + ,108.48 + ,0.8883 + ,101.33 + ,0.8924 + ,87.57 + ,0.8833 + ,97.44 + ,0.87 + ,96.06 + ,0.8758 + ,106.67 + ,0.8858 + ,102.67 + ,0.917 + ,104.54 + ,0.9554 + ,102.46 + ,0.9922 + ,103.35 + ,0.9778 + ,83.27 + ,0.9808 + ,108.22 + ,0.9811 + ,115.23 + ,1.0014 + ,103.7 + ,1.0183 + ,93.61 + ,1.0622 + ,100.25 + ,1.0773 + ,100.56 + ,1.0807 + ,108.86 + ,1.0848 + ,105.43 + ,1.1582 + ,104.77 + ,1.1663 + ,109.13 + ,1.1372 + ,106.13 + ,1.1139 + ,82.27 + ,1.1222 + ,113.6 + ,1.1692 + ,117.73 + ,1.1702 + ,104.83 + ,1.2286 + ,104.61 + ,1.2613 + ,102.93 + ,1.2646 + ,106.95 + ,1.2262 + ,123.45 + ,1.1985 + ,111.99 + ,1.2007 + ,103.95 + ,1.2138 + ,122.05 + ,1.2266 + ,108.04 + ,1.2176 + ,93.72 + ,1.2218 + ,119.61 + ,1.249 + ,118.29 + ,1.2991 + ,117.14 + ,1.3408 + ,112.76 + ,1.3119 + ,105.97 + ,1.3014 + ,107.96 + ,1.3201 + ,122.27 + ,1.2938 + ,114.54 + ,1.2694 + ,110.15 + ,1.2165 + ,120.02 + ,1.2037 + ,103.94 + ,1.2292 + ,96.18 + ,1.2256 + ,121.01 + ,1.2015 + ,110.55 + ,1.1786 + ,120.04 + ,1.1856 + ,114.19) + ,dim=c(2 + ,72) + ,dimnames=list(c('wisselkoers' + ,'uitvoer') + ,1:72)) > y <- array(NA,dim=c(2,72),dimnames=list(c('wisselkoers','uitvoer'),1:72)) > 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/1t9j21199815021.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] 2 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 3.9911, p-value = 6.576e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3212679 > 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/2p9x31199815021.tab") > > system("convert tmp/1t9j21199815021.ps tmp/1t9j21199815021.png") > > > proc.time() user system elapsed 0.641 0.188 0.727