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(96.8 + ,92.9 + ,105.8 + ,119.3 + ,114.1 + ,107.7 + ,106.6 + ,130.4 + ,110.3 + ,103.5 + ,109.7 + ,126 + ,103.9 + ,91.1 + ,108.8 + ,125.4 + ,101.6 + ,79.8 + ,113.4 + ,130.5 + ,94.6 + ,71.9 + ,113.7 + ,115.9 + ,95.9 + ,82.9 + ,103.6 + ,108.7 + ,104.7 + ,90.1 + ,98.2 + ,124 + ,102.8 + ,100.7 + ,95.5 + ,119.4 + ,98.1 + ,90.7 + ,94.4 + ,118.6 + ,113.9 + ,108.8 + ,95.9 + ,131.3 + ,80.9 + ,44.1 + ,103.2 + ,111.1 + ,95.7 + ,93.6 + ,104.1 + ,124.8 + ,113.2 + ,107.4 + ,127.6 + ,132.3 + ,105.9 + ,96.5 + ,130.3 + ,126.7 + ,108.8 + ,93.6 + ,133 + ,131.7 + ,102.3 + ,76.5 + ,140.4 + ,130.9 + ,99 + ,76.7 + ,123.5 + ,122.1 + ,100.7 + ,84 + ,116.9 + ,113.2 + ,115.5 + ,103.3 + ,115.9 + ,133.6 + ,100.7 + ,88.5 + ,113.1 + ,119.2 + ,109.9 + ,99 + ,112.1 + ,129.4 + ,114.6 + ,105.9 + ,112.4 + ,131.4 + ,85.4 + ,44.7 + ,118.9 + ,117.1 + ,100.5 + ,94 + ,117.4 + ,130.5 + ,114.8 + ,107.1 + ,115.6 + ,132.3 + ,116.5 + ,104.8 + ,120.7 + ,140.8 + ,112.9 + ,102.5 + ,114.9 + ,137.5 + ,102 + ,77.7 + ,122 + ,128.6 + ,106 + ,85.2 + ,119.6 + ,126.7 + ,105.3 + ,91.3 + ,114.6 + ,120.8 + ,118.8 + ,106.5 + ,118.4 + ,139.3 + ,106.1 + ,92.4 + ,110.9 + ,128.6 + ,109.3 + ,97.5 + ,111.6 + ,131.3 + ,117.2 + ,107 + ,114.6 + ,136.3 + ,92.5 + ,51.1 + ,112.1 + ,128.8 + ,104.2 + ,98.6 + ,117.4 + ,133.2 + ,112.5 + ,102.2 + ,114.8 + ,136.3 + ,122.4 + ,114.3 + ,123.4 + ,151.1 + ,113.3 + ,99.4 + ,118.1 + ,145 + ,100 + ,72.5 + ,121.9 + ,134.4 + ,110.7 + ,92.3 + ,123.3 + ,135.7 + ,112.8 + ,99.4 + ,120.1 + ,128.7 + ,109.8 + ,85.9 + ,116.7 + ,129.2 + ,117.3 + ,109.4 + ,106.3 + ,138.6 + ,109.1 + ,97.6 + ,106.8 + ,132.7 + ,115.9 + ,104.7 + ,107.5 + ,132.5 + ,96 + ,56.9 + ,108.5 + ,137.3 + ,99.8 + ,86.7 + ,113.6 + ,127.1 + ,116.8 + ,108.5 + ,111.6 + ,143.7 + ,115.7 + ,103.4 + ,117.1 + ,149.9 + ,99.4 + ,86.2 + ,120 + ,131.6 + ,94.3 + ,71 + ,123 + ,138.8 + ,91 + ,75.9 + ,123.3 + ,122.5 + ,93.2 + ,87.1 + ,114.5 + ,122 + ,103.1 + ,102 + ,114.1 + ,135.6 + ,94.1 + ,88.5 + ,107.8 + ,133.4 + ,91.8 + ,87.8 + ,110.6 + ,127.3 + ,102.7 + ,100.8 + ,112.6 + ,138.9 + ,82.6 + ,50.6 + ,115.7 + ,131.4 + ,89.1 + ,85.9 + ,116.7 + ,131.6) + ,dim=c(4 + ,61) + ,dimnames=list(c('TIP' + ,'Bouw' + ,'Energie' + ,'Voeding&Drank') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('TIP','Bouw','Energie','Voeding&Drank'),1:61)) > 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/1u2qx1258124876.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.7607, p-value = 8.438e-15 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6823532 > 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/20ja81258124876.tab") > > system("convert tmp/1u2qx1258124876.ps tmp/1u2qx1258124876.png") > > > proc.time() user system elapsed 0.465 0.304 0.608