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(20972,8.4,2.9,35681,8.4,2.6,37034,8.6,2.5,35645,8.7,3.2,33379,8.7,3.1,32747,8.6,3.1,49585,8,2.9,41745,8.1,2.5,48564,8.1,2.8,52518,8.5,3.1,45594,8.6,2.6,51442,8.6,2.3,25094,8.3,2.3,33702,8.3,2.6,39120,8.5,2.9,33842,9.2,2,29896,9.2,2.2,31481,9,2.4,43895,7.4,2.3,39477,7.3,2.6,53726,7.4,1.9,61465,8.6,1.1,50104,8.7,1.3,47460,8.7,1.6,26451,8.5,1.7,30306,8.4,1.9,42598,8.6,1.6,34485,8.4,1.8,29027,8.4,1.8,35489,8.2,1.5,40357,7.7,1.6,37532,7.6,1,43899,7.7,1.5,48572,8.1,1.8,43901,8.2,1.7,50556,8.3,1.2,18387,8.1,1.4,27534,8,1.1,38030,8.2,1.3,31917,7.6,1.3,26414,7.7,1.3,35306,7.6,1.3,38271,6.9,0.9,41454,6.9,1.3,52408,7,1.8,53536,7.4,2.7,53152,7.4,2.6,56421,7.5,2.9,21538,7.4,2.2,33625,7.4,2.1,42625,7.8,2.3,31295,6.6,2.3,33795,6.6,2.7,41227,6.2,2.6,45382,6.1,2.9,47206,6.2,3.1,46235,6.3,2.8,51378,6,2.1,46865,6.2,2.3,58608,6.3,2.2),dim=c(3,60),dimnames=list(c('Personenwagens','Werkloosheidgraad','Consumptieprijsindex '),1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('Personenwagens','Werkloosheidgraad','Consumptieprijsindex '),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: 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/13skc1198251501.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd 4: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd > 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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -1.8221, p-value = 0.06844 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1645407 > 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/2szfx1198251501.tab") > > system("convert tmp/13skc1198251501.ps tmp/13skc1198251501.png") > > > proc.time() user system elapsed 0.666 0.201 0.741