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(16.4 + ,18.0 + ,94.3 + ,6.9 + ,17.8 + ,19.6 + ,99.4 + ,6.6 + ,22.3 + ,23.3 + ,115.7 + ,6.9 + ,22.8 + ,23.7 + ,116.8 + ,7.5 + ,18.3 + ,20.3 + ,99.8 + ,7.9 + ,22.4 + ,22.8 + ,96.0 + ,7.7 + ,23.9 + ,24.3 + ,115.9 + ,6.5 + ,21.3 + ,21.5 + ,109.1 + ,6.1 + ,23.0 + ,23.5 + ,117.3 + ,6.4 + ,21.4 + ,22.2 + ,109.8 + ,6.8 + ,21.2 + ,20.9 + ,112.8 + ,7.1 + ,20.9 + ,22.2 + ,110.7 + ,7.3 + ,17.9 + ,19.5 + ,100.0 + ,7.2 + ,20.7 + ,21.1 + ,113.3 + ,7.0 + ,22.2 + ,22.0 + ,122.4 + ,7.0 + ,19.8 + ,19.2 + ,112.5 + ,7.0 + ,17.7 + ,17.8 + ,104.2 + ,7.3 + ,19.6 + ,19.2 + ,92.5 + ,7.5 + ,20.8 + ,19.9 + ,117.2 + ,7.2 + ,19.8 + ,19.6 + ,109.3 + ,7.7 + ,18.6 + ,18.1 + ,106.1 + ,8.0 + ,21. + ,20.4 + ,118.8 + ,7.9 + ,18.6 + ,18.1 + ,105.3 + ,8.0 + ,18.9 + ,18.6 + ,106.0 + ,8.0 + ,17.3 + ,17.6 + ,102.0 + ,7.9 + ,20.0 + ,19.4 + ,112.9 + ,7.9 + ,19.9 + ,19.3 + ,116.5 + ,8.8 + ,19.5 + ,18.6 + ,114.8 + ,8.1 + ,16.2 + ,16.9 + ,100.5 + ,8.1 + ,17.6 + ,16.4 + ,85.4 + ,8.2 + ,19.8 + ,19.0 + ,86.6 + ,8.0 + ,19.4 + ,18.7 + ,109.9 + ,8.3 + ,17.2 + ,17.1 + ,100.7 + ,8.5 + ,21.1 + ,21.5 + ,115.5 + ,8.6 + ,17.8 + ,17.8 + ,100.7 + ,8.7 + ,17.5 + ,18.1 + ,99.0 + ,8.7 + ,18.0 + ,19.0 + ,102.3 + ,8.5 + ,19.1 + ,18.9 + ,108.8 + ,8.4 + ,17.7 + ,16.8 + ,105.9 + ,8.5 + ,19.2 + ,18.1 + ,113.2 + ,8.7 + ,15.1 + ,15.7 + ,95.7 + ,8.7 + ,16.3 + ,15.1 + ,80.9 + ,8.6 + ,18.6 + ,18.3 + ,113.9 + ,7.9 + ,17.2 + ,16.5 + ,98.1 + ,8.1 + ,17.8 + ,16.9 + ,102.8 + ,8.2 + ,19.1 + ,18.4 + ,104.7 + ,8.5 + ,16.6 + ,16.4 + ,95.9 + ,8.6 + ,16.0 + ,15.7 + ,94.6 + ,8.5 + ,16.7 + ,16.9 + ,101.6 + ,8.3 + ,17.4 + ,16.6 + ,103.9 + ,8.2 + ,17.9 + ,16.7 + ,110.3 + ,8.7 + ,17.8 + ,16.6 + ,114.1 + ,9.3 + ,13.9 + ,14.4 + ,96.8 + ,9.3 + ,15.9 + ,14.5 + ,87.4 + ,8.8 + ,17.9 + ,17.5 + ,111.4 + ,7.4 + ,15.4 + ,14.3 + ,97.4 + ,7.2 + ,16.4 + ,15.4 + ,102.9 + ,7.5 + ,17.9 + ,17.2 + ,112.7 + ,8.3 + ,15.3 + ,14.6 + ,97.0 + ,8.8 + ,14.6 + ,14.2 + ,95.1 + ,8.9 + ,14.9 + ,14.9 + ,96.9 + ,8.6 + ,15.0 + ,14.1 + ,98.6 + ,8.4 + ,16.7 + ,15.6 + ,111.7 + ,8.4 + ,16.3 + ,14.6 + ,109.8 + ,8.4 + ,11.7 + ,11.9 + ,89.9 + ,8.4 + ,15.1 + ,13.5 + ,87.4 + ,8.3 + ,15.5 + ,14.2 + ,104.5 + ,7.6 + ,15.0 + ,13.7 + ,98.1 + ,7.6 + ,15.4 + ,14.4 + ,102.7 + ,7.9 + ,16.0 + ,15.3 + ,105.4 + ,8.0 + ,14.7 + ,14.3 + ,97.0 + ,8.2 + ,14.8 + ,14.5 + ,97.4 + ,8.3) + ,dim=c(4 + ,72) + ,dimnames=list(c('Import' + ,'Export' + ,'Industriele_productie' + ,'Werkloosheid') + ,1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('Import','Export','Industriele_productie','Werkloosheid'),1:72)) > 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/1aw1k1258121737.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 = 10.1917, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8280635 > 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/2qt661258121737.tab") > > system("convert tmp/1aw1k1258121737.ps tmp/1aw1k1258121737.png") > > > proc.time() user system elapsed 0.514 0.221 0.581