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(9.3 + ,6.7 + ,12.3 + ,104.1 + ,8.7 + ,6.3 + ,14.6 + ,90.2 + ,8.2 + ,5.9 + ,17.7 + ,99.2 + ,8.3 + ,6 + ,15.2 + ,116.5 + ,8.5 + ,6.3 + ,22.3 + ,98.4 + ,8.6 + ,6.8 + ,14.8 + ,90.6 + ,8.5 + ,6.4 + ,10 + ,130.5 + ,8.2 + ,6.3 + ,2.9 + ,107.4 + ,8.1 + ,6.7 + ,5.6 + ,106 + ,7.9 + ,6.7 + ,16.1 + ,196.5 + ,8.6 + ,6.9 + ,23.7 + ,107.8 + ,8.7 + ,7 + ,26.5 + ,90.5 + ,8.7 + ,6.2 + ,20.9 + ,123.8 + ,8.5 + ,6.3 + ,15.9 + ,114.7 + ,8.4 + ,6.8 + ,13 + ,115.3 + ,8.5 + ,6.8 + ,7.8 + ,197 + ,8.7 + ,6.8 + ,17.5 + ,88.4 + ,8.7 + ,6.2 + ,24.4 + ,93.8 + ,8.6 + ,6.6 + ,33.7 + ,111.3 + ,8.5 + ,6.8 + ,32.3 + ,105.9 + ,8.3 + ,6.5 + ,33.4 + ,123.6 + ,8 + ,6.4 + ,22.2 + ,171 + ,8.2 + ,6.3 + ,21.7 + ,97 + ,8.1 + ,5.9 + ,12.8 + ,99.2 + ,8.1 + ,5.7 + ,15.2 + ,126.6 + ,8 + ,6 + ,17.1 + ,103.4 + ,7.9 + ,6.1 + ,17.6 + ,121.3 + ,7.9 + ,5.7 + ,17.5 + ,129.6 + ,8 + ,5.8 + ,14.7 + ,110.8 + ,8 + ,5.8 + ,12.9 + ,98.9 + ,7.9 + ,5.8 + ,12 + ,122.8 + ,8 + ,5.3 + ,11.1 + ,120.9 + ,7.7 + ,5.3 + ,12.3 + ,133.1 + ,7.2 + ,5.3 + ,18.9 + ,203.1 + ,7.5 + ,5.2 + ,24 + ,110.2 + ,7.3 + ,5.4 + ,29.6 + ,119.5 + ,7 + ,6.2 + ,30.9 + ,135.1 + ,7 + ,6.9 + ,33 + ,113.9 + ,7 + ,7.1 + ,34.9 + ,137.4 + ,7.2 + ,7.5 + ,40.1 + ,157.1 + ,7.3 + ,7.6 + ,30.8 + ,126.4 + ,7.1 + ,8.4 + ,31 + ,112.2 + ,6.8 + ,8.1 + ,23.8 + ,128.8 + ,6.4 + ,9.1 + ,30.8 + ,136.8 + ,6.1 + ,9.8 + ,27.6 + ,156.5 + ,6.5 + ,9.9 + ,30.2 + ,215.2 + ,7.7 + ,9.4 + ,22.2 + ,146.7 + ,7.9 + ,9.5 + ,19.9 + ,130.8 + ,7.5 + ,8.8 + ,18.3 + ,133.1 + ,6.9 + ,7.2 + ,15.2 + ,153.4 + ,6.6 + ,6.7 + ,10.1 + ,159.9 + ,6.9 + ,6.1 + ,6.5 + ,174.6 + ,7.7 + ,5.9 + ,1.9 + ,145 + ,8 + ,4.6 + ,2 + ,112.9 + ,8 + ,4.7 + ,4.3 + ,137.8 + ,7.7 + ,3.8 + ,4.8 + ,150.6 + ,7.3 + ,3 + ,4.9 + ,162.1 + ,7.4 + ,2.3 + ,2.1 + ,226.4 + ,8.1 + ,3.3 + ,5.5 + ,112.3 + ,8.3 + ,3 + ,10.6 + ,126.3) + ,dim=c(4 + ,60) + ,dimnames=list(c('Werkloosheid' + ,'Inflatie' + ,'Economische_Activiteit' + ,'Investeringen') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Werkloosheid','Inflatie','Economische_Activiteit','Investeringen'),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/17s581258146673.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 = -0.4098, p-value = 0.682 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.0374839 > 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/2osrl1258146673.tab") > > system("convert tmp/17s581258146673.ps tmp/17s581258146673.png") > > > proc.time() user system elapsed 0.476 0.232 0.586