R version 2.8.1 (2008-12-22) 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(1 + ,1.6 + ,105.4 + ,168802 + ,-0.8 + ,1.7 + ,104.4 + ,173276 + ,-2.9 + ,1.6 + ,104.9 + ,172957 + ,-0.7 + ,1.4 + ,106.9 + ,173558 + ,-0.7 + ,2.1 + ,107.6 + ,173820 + ,1.5 + ,1.9 + ,106.5 + ,171663 + ,3 + ,1.7 + ,106 + ,174110 + ,3.2 + ,1.8 + ,106.5 + ,174338 + ,3.1 + ,2 + ,105.9 + ,175440 + ,3.9 + ,2.5 + ,104.3 + ,174922 + ,1 + ,2.1 + ,103.8 + ,172188 + ,1.3 + ,2.1 + ,102.7 + ,171330 + ,0.8 + ,2.3 + ,103.2 + ,169560 + ,1.2 + ,2.4 + ,103.5 + ,174579 + ,2.9 + ,2.4 + ,104.5 + ,173740 + ,3.9 + ,2.3 + ,103.5 + ,173427 + ,4.5 + ,1.7 + ,103.8 + ,172952 + ,4.5 + ,2 + ,102.6 + ,170305 + ,3.3 + ,2.3 + ,102.1 + ,172717 + ,2 + ,2 + ,105.1 + ,173019 + ,1.5 + ,2 + ,106.2 + ,173690 + ,1 + ,1.3 + ,106.5 + ,172439 + ,2.1 + ,1.7 + ,106.3 + ,171914 + ,3 + ,1.9 + ,107.6 + ,171968 + ,4 + ,1.7 + ,107.4 + ,169500 + ,5.1 + ,1.6 + ,109.2 + ,173898 + ,4.5 + ,1.7 + ,108.5 + ,172308 + ,4.2 + ,1.8 + ,107 + ,171568 + ,3.3 + ,1.9 + ,107.8 + ,164939 + ,2.7 + ,1.9 + ,109.7 + ,161275 + ,1.8 + ,1.9 + ,110.6 + ,160770 + ,1.4 + ,2 + ,110.9 + ,162466 + ,0.5 + ,2.1 + ,111.7 + ,160185 + ,-0.4 + ,1.9 + ,111.2 + ,154836 + ,0.8 + ,1.9 + ,110.2 + ,154103 + ,0.7 + ,1.3 + ,112.5 + ,150495 + ,1.9 + ,1.3 + ,111.6 + ,142707 + ,2 + ,1.4 + ,111.2 + ,149962 + ,1.1 + ,1.2 + ,112.6 + ,149967 + ,0.9 + ,1.3 + ,113.1 + ,144572 + ,0.4 + ,1.8 + ,111.8 + ,143819 + ,0.7 + ,2.2 + ,106.3 + ,141070 + ,2.1 + ,2.6 + ,115 + ,144119 + ,2.8 + ,2.8 + ,114 + ,145330 + ,3.9 + ,3.1 + ,113.1 + ,143279 + ,3.5 + ,3.9 + ,114.9 + ,139063 + ,2 + ,3.7 + ,115.5 + ,139202 + ,2 + ,4.6 + ,113.8 + ,133632 + ,1.5 + ,5.1 + ,114.7 + ,134476 + ,2.5 + ,5.2 + ,114.2 + ,141859 + ,3.1 + ,4.9 + ,112.9 + ,140693 + ,2.7 + ,5.1 + ,112.1 + ,138047 + ,2.8 + ,4.8 + ,111.1 + ,138346 + ,2.5 + ,3.9 + ,109.2 + ,140167 + ,3 + ,3.5 + ,106.6 + ,146796 + ,3.2 + ,3.3 + ,104.1 + ,152228 + ,2.8 + ,2.8 + ,103.2 + ,155410 + ,2.4 + ,1.6 + ,91.2 + ,159032 + ,2 + ,1.5 + ,93.6 + ,160312 + ,1.8 + ,0.7 + ,93.9 + ,157687 + ,1.1 + ,-0.1 + ,93.8 + ,160141 + ,-1.5 + ,-0.7 + ,93.8 + ,167421 + ,-3.7 + ,-0.2 + ,93.8 + ,167628 + ,-4.2 + ,-0.6 + ,94.3 + ,164403 + ,-3.5 + ,-0.6 + ,94.5 + ,163405) + ,dim=c(4 + ,65) + ,dimnames=list(c('bbp' + ,'cpi' + ,'productie' + ,'werkzoekenden') + ,1:65)) > y <- array(NA,dim=c(4,65),dimnames=list(c('bbp','cpi','productie','werkzoekenden'),1:65)) > 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/rcomp/tmp/1by411258032434.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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 = 2.992, p-value = 0.002771 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2605795 > 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/rcomp/tmp/2zm2z1258032434.tab") > > system("convert tmp/1by411258032434.ps tmp/1by411258032434.png") > > > proc.time() user system elapsed 0.470 0.310 0.808