R version 2.8.0 (2008-10-20) 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(82.7 + ,97.4 + ,74.8 + ,89.3 + ,88.9 + ,97 + ,93.1 + ,87.5 + ,105.9 + ,105.4 + ,103.9 + ,106.7 + ,100.8 + ,102.7 + ,83.9 + ,102.5 + ,94 + ,98.1 + ,77.7 + ,109.2 + ,105 + ,104.5 + ,141.5 + ,123.7 + ,58.5 + ,87.4 + ,58.9 + ,83.1 + ,87.6 + ,89.9 + ,75.3 + ,97 + ,113.1 + ,109.8 + ,108.4 + ,119.1 + ,112.5 + ,111.7 + ,91 + ,125.1 + ,89.6 + ,98.6 + ,84.6 + ,113.6 + ,74.5 + ,96.9 + ,179.8 + ,122.4 + ,82.7 + ,95.1 + ,85.6 + ,92.8 + ,90.1 + ,97 + ,76.4 + ,97.2 + ,109.4 + ,112.7 + ,109.7 + ,115.6 + ,96 + ,102.9 + ,99.1 + ,111.3 + ,89.2 + ,97.4 + ,86.7 + ,114.6 + ,109.1 + ,111.4 + ,111.4 + ,137.5 + ,49.1 + ,87.4 + ,78.4 + ,83.7 + ,92.9 + ,96.8 + ,76.7 + ,106 + ,107.7 + ,114.1 + ,114.2 + ,123.4 + ,103.5 + ,110.3 + ,99.7 + ,126.5 + ,91.1 + ,103.9 + ,94.2 + ,120 + ,79.8 + ,101.6 + ,173.5 + ,141.6 + ,71.9 + ,94.6 + ,83.1 + ,90.5 + ,82.9 + ,95.9 + ,88.9 + ,96.5 + ,90.1 + ,104.7 + ,132 + ,113.5 + ,100.7 + ,102.8 + ,122.1 + ,120.1 + ,90.7 + ,98.1 + ,105.1 + ,123.9 + ,108.8 + ,113.9 + ,133.7 + ,144.4 + ,44.1 + ,80.9 + ,63.6 + ,90.8 + ,93.6 + ,95.7 + ,112.7 + ,114.2 + ,107.4 + ,113.2 + ,120.5 + ,138.1 + ,96.5 + ,105.9 + ,112 + ,135 + ,93.6 + ,108.8 + ,126.2 + ,131.3 + ,76.5 + ,102.3 + ,209.2 + ,144.6 + ,76.7 + ,99 + ,91 + ,101.7 + ,84 + ,100.7 + ,116.7 + ,108.7 + ,103.3 + ,115.5 + ,137.6 + ,135.3 + ,88.5 + ,100.7 + ,108.1 + ,124.3 + ,99 + ,109.9 + ,136.6 + ,138.3 + ,105.9 + ,114.6 + ,152.3 + ,158.2 + ,44.7 + ,85.4 + ,114.3 + ,93.5 + ,94 + ,100.5 + ,120.7 + ,124.8 + ,107.1 + ,114.8 + ,131.8 + ,154.4 + ,104.8 + ,116.5 + ,129.4 + ,152.8 + ,102.5 + ,112.9 + ,187.5 + ,148.9 + ,77.7 + ,102 + ,189.5 + ,170.3 + ,85.2 + ,106 + ,109.2 + ,124.8 + ,91.3 + ,105.3 + ,158.1 + ,134.4 + ,106.5 + ,118.8 + ,176.2 + ,154 + ,92.4 + ,106.1 + ,125.5 + ,147.9 + ,97.5 + ,109.3 + ,155 + ,168.1 + ,107 + ,117.2 + ,170.3 + ,175.7 + ,51.1 + ,92.5 + ,99.4 + ,116.7 + ,98.6 + ,104.2 + ,139.2 + ,140.8 + ,102.2 + ,112.5 + ,169.6 + ,164.2 + ,114.3 + ,122.4 + ,136.1 + ,173.8 + ,99.4 + ,113.3 + ,168.2 + ,167.8 + ,72.5 + ,100 + ,318.6 + ,166.6 + ,92.3 + ,110.7 + ,154.1 + ,135.1 + ,99.4 + ,112.8 + ,161.4 + ,158.1 + ,85.9 + ,109.8 + ,183.4 + ,151.8 + ,109.4 + ,117.3 + ,167.2 + ,168.7 + ,97.6 + ,109.1 + ,205.3 + ,166.9) + ,dim=c(4 + ,65) + ,dimnames=list(c('Bouwproductie' + ,'TotaleProductie' + ,'Investeringen' + ,'Omzet') + ,1:65)) > y <- array(NA,dim=c(4,65),dimnames=list(c('Bouwproductie','TotaleProductie','Investeringen','Omzet'),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/html/rcomp/tmp/1k5j11228496049.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.4576, p-value = 8.815e-14 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.635158 > 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/2npg11228496049.tab") > > system("convert tmp/1k5j11228496049.ps tmp/1k5j11228496049.png") > > > proc.time() user system elapsed 0.486 0.233 0.584