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(95.1 + ,98.2 + ,121.8 + ,113.4 + ,97.0 + ,98.7 + ,127.6 + ,101.3 + ,112.7 + ,113.3 + ,129.9 + ,97.8 + ,102.9 + ,104.6 + ,128.0 + ,95.0 + ,97.4 + ,99.3 + ,123.5 + ,93.8 + ,111.4 + ,111.8 + ,124.0 + ,94.5 + ,87.4 + ,97.3 + ,127.4 + ,101.4 + ,96.8 + ,97.7 + ,127.6 + ,105.8 + ,114.1 + ,115.6 + ,128.4 + ,106.6 + ,110.3 + ,111.9 + ,131.4 + ,109.7 + ,103.9 + ,107.0 + ,135.1 + ,108.8 + ,101.6 + ,107.1 + ,134.0 + ,113.4 + ,94.6 + ,100.6 + ,144.5 + ,113.7 + ,95.9 + ,99.2 + ,147.3 + ,103.6 + ,104.7 + ,108.4 + ,150.9 + ,98.2 + ,102.8 + ,103.0 + ,148.7 + ,95.5 + ,98.1 + ,99.8 + ,141.4 + ,94.4 + ,113.9 + ,115.0 + ,138.9 + ,95.9 + ,80.9 + ,90.8 + ,139.8 + ,103.2 + ,95.7 + ,95.9 + ,145.6 + ,104.1 + ,113.2 + ,114.4 + ,147.9 + ,127.6 + ,105.9 + ,108.2 + ,148.5 + ,130.3 + ,108.8 + ,112.6 + ,151.1 + ,133.0 + ,102.3 + ,109.1 + ,157.5 + ,140.4 + ,99.0 + ,105.0 + ,167.5 + ,123.5 + ,100.7 + ,105.0 + ,172.3 + ,116.9 + ,115.5 + ,118.5 + ,173.5 + ,115.9 + ,100.7 + ,103.7 + ,187.5 + ,113.1 + ,109.9 + ,112.5 + ,205.5 + ,112.1 + ,114.6 + ,116.6 + ,195.1 + ,112.4 + ,85.4 + ,96.6 + ,204.5 + ,118.9 + ,100.5 + ,101.9 + ,204.5 + ,117.4 + ,114.8 + ,116.5 + ,201.7 + ,115.6 + ,116.5 + ,119.3 + ,207.0 + ,120.7 + ,112.9 + ,115.4 + ,206.6 + ,114.9 + ,102.0 + ,108.5 + ,210.6 + ,122.0 + ,106.0 + ,111.5 + ,211.1 + ,119.6 + ,105.3 + ,108.8 + ,215.0 + ,114.6 + ,118.8 + ,121.8 + ,223.9 + ,118.4 + ,106.1 + ,109.6 + ,238.2 + ,110.9 + ,109.3 + ,112.2 + ,238.9 + ,111.6 + ,117.2 + ,119.6 + ,229.6 + ,114.6 + ,92.5 + ,104.1 + ,232.2 + ,112.1 + ,104.2 + ,105.3 + ,222.1 + ,117.4 + ,112.5 + ,115.0 + ,221.6 + ,114.8 + ,122.4 + ,124.1 + ,227.3 + ,123.4 + ,113.3 + ,116.8 + ,221.0 + ,118.1 + ,100.0 + ,107.5 + ,213.6 + ,121.9 + ,110.7 + ,115.6 + ,243.4 + ,123.3 + ,112.8 + ,116.2 + ,253.8 + ,120.1 + ,109.8 + ,116.3 + ,265.3 + ,116.7 + ,117.3 + ,119.0 + ,268.2 + ,106.3 + ,109.1 + ,111.9 + ,268.5 + ,106.8 + ,115.9 + ,118.6 + ,266.9 + ,107.5 + ,96.0 + ,106.9 + ,268.4 + ,108.5 + ,99.8 + ,103.2 + ,250.8 + ,113.6 + ,116.8 + ,118.6 + ,231.2 + ,111.6 + ,115.7 + ,118.7 + ,192.0 + ,117.1 + ,99.4 + ,102.8 + ,171.4 + ,120.0 + ,94.3 + ,100.6 + ,160.0 + ,123.0) + ,dim=c(4 + ,60) + ,dimnames=list(c('TIP' + ,'Bouwnijverheid' + ,'IGP' + ,'Energie ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('TIP','Bouwnijverheid','IGP','Energie '),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/1lrr71260369451.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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 = 9.5364, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8463071 > 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/2ronw1260369451.tab") > > system("convert tmp/1lrr71260369451.ps tmp/1lrr71260369451.png") > > > proc.time() user system elapsed 0.503 0.209 1.376