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(3 + ,104.29 + ,101.2 + ,521 + ,3.21 + ,104.56 + ,101.1 + ,501 + ,3.37 + ,104.79 + ,100.7 + ,518 + ,3.51 + ,105.08 + ,100.1 + ,547 + ,3.75 + ,105.21 + ,99.9 + ,629 + ,4.11 + ,105.43 + ,99.7 + ,572 + ,4.25 + ,105.69 + ,99.5 + ,582 + ,4.25 + ,105.74 + ,99.2 + ,574 + ,4.5 + ,106.2 + ,99 + ,461 + ,4.7 + ,106.04 + ,99 + ,576 + ,4.75 + ,106.45 + ,99.3 + ,460 + ,4.75 + ,106.4 + ,99.5 + ,455 + ,4.75 + ,106.48 + ,99.7 + ,444 + ,4.75 + ,106.83 + ,100 + ,488 + ,4.75 + ,107.14 + ,100.4 + ,513 + ,4.75 + ,107.94 + ,100.6 + ,468 + ,4.58 + ,108.46 + ,100.7 + ,488 + ,4.5 + ,108.81 + ,100.7 + ,536 + ,4.5 + ,108.92 + ,100.6 + ,486 + ,4.49 + ,108.99 + ,100.5 + ,460 + ,4.03 + ,109.16 + ,100.6 + ,376 + ,3.75 + ,109.22 + ,100.5 + ,503 + ,3.39 + ,109.43 + ,100.4 + ,369 + ,3.25 + ,109.23 + ,100.3 + ,353 + ,3.25 + ,109.93 + ,100.4 + ,359 + ,3.25 + ,110.09 + ,100.4 + ,400 + ,3.25 + ,110.33 + ,100.4 + ,374 + ,3.25 + ,110.11 + ,100.4 + ,430 + ,3.25 + ,110.35 + ,100.4 + ,433 + ,3.25 + ,110.09 + ,100.5 + ,418 + ,3.25 + ,110.44 + ,100.6 + ,438 + ,3.25 + ,110.39 + ,100.6 + ,389 + ,3.25 + ,110.62 + ,100.5 + ,368 + ,3.25 + ,110.43 + ,100.5 + ,386 + ,3.25 + ,110.46 + ,100.7 + ,261 + ,2.85 + ,110.55 + ,101.1 + ,294 + ,2.75 + ,110.94 + ,101.5 + ,263 + ,2.75 + ,111.56 + ,101.9 + ,293 + ,2.55 + ,111.82 + ,102.1 + ,303 + ,2.5 + ,111.73 + ,102.1 + ,326 + ,2.5 + ,111.57 + ,102.1 + ,314 + ,2.1 + ,111.85 + ,102.4 + ,332 + ,2 + ,112.06 + ,102.8 + ,347 + ,2 + ,112.2 + ,103.1 + ,290 + ,2 + ,112.47 + ,103.1 + ,340 + ,2 + ,112.15 + ,102.9 + ,371 + ,2 + ,112.36 + ,102.4 + ,340 + ,2 + ,112.32 + ,101.9 + ,376 + ,2 + ,112.67 + ,101.3 + ,322 + ,2 + ,113.02 + ,100.7 + ,364 + ,2 + ,113.05 + ,100.6 + ,379 + ,2 + ,113.5 + ,101 + ,343 + ,2 + ,113.67 + ,101.5 + ,358 + ,2 + ,113.65 + ,101.9 + ,433 + ,2 + ,114 + ,102.1 + ,344 + ,2 + ,114.03 + ,102.3 + ,357 + ,2 + ,114.08 + ,102.5 + ,385 + ,2 + ,114.49 + ,102.9 + ,392 + ,2 + ,114.48 + ,103.6 + ,308 + ,2 + ,114.25 + ,104.3 + ,294) + ,dim=c(4 + ,60) + ,dimnames=list(c('Rentevoet' + ,'Gezondheidsindex' + ,'totaleproductie' + ,'bouwaanvragen') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Rentevoet','Gezondheidsindex','totaleproductie','bouwaanvragen'),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/1y7z71258015547.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 = -7.6557, p-value = 1.923e-14 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.7156634 > 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/2kuef1258015547.tab") > > system("convert tmp/1y7z71258015547.ps tmp/1y7z71258015547.png") > > > proc.time() user system elapsed 0.485 0.205 0.731