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(101.3 + ,99.2 + ,99.9 + ,124.9 + ,105.26 + ,102 + ,93.6 + ,98.6 + ,132 + ,101.8 + ,109.2 + ,104.2 + ,107.2 + ,151.4 + ,112.36 + ,88.6 + ,95.3 + ,95.7 + ,108.9 + ,99.5 + ,94.3 + ,102.7 + ,93.7 + ,121.3 + ,104.65 + ,98.3 + ,103.1 + ,106.7 + ,123.4 + ,101.13 + ,86.4 + ,100 + ,86.7 + ,90.3 + ,89.8 + ,80.6 + ,107.2 + ,95.3 + ,79.3 + ,87.84 + ,104.1 + ,107 + ,99.3 + ,117.2 + ,96.41 + ,108.2 + ,119 + ,101.8 + ,116.9 + ,103.26 + ,93.4 + ,110.4 + ,96 + ,120.8 + ,100.31 + ,71.9 + ,101.7 + ,91.7 + ,96.1 + ,92.33 + ,94.1 + ,102.4 + ,95.3 + ,100.8 + ,96.19 + ,94.9 + ,98.8 + ,96.6 + ,105.3 + ,96.37 + ,96.4 + ,105.6 + ,107.2 + ,116.1 + ,103.06 + ,91.1 + ,104.4 + ,108 + ,112.8 + ,101.5 + ,84.4 + ,106.3 + ,98.4 + ,114.5 + ,101.88 + ,86.4 + ,107.2 + ,103.1 + ,117.2 + ,100.85 + ,88 + ,108.5 + ,81.1 + ,77.1 + ,95.56 + ,75.1 + ,106.9 + ,96.6 + ,80.1 + ,87.6 + ,109.7 + ,114.2 + ,103.7 + ,120.3 + ,101.18 + ,103 + ,125.9 + ,106.6 + ,133.4 + ,110.8 + ,82.1 + ,110.6 + ,97.6 + ,109.4 + ,101.1 + ,68 + ,110.5 + ,87.6 + ,93.2 + ,104.42 + ,96.4 + ,106.7 + ,99.4 + ,91.2 + ,103.27 + ,94.3 + ,104.7 + ,98.5 + ,99.2 + ,100.87 + ,90 + ,107.4 + ,105.2 + ,108.2 + ,107.8 + ,88 + ,109.8 + ,104.6 + ,101.5 + ,104.99 + ,76.1 + ,103.4 + ,97.5 + ,106.9 + ,100.76 + ,82.5 + ,114.8 + ,108.9 + ,104.4 + ,104.46 + ,81.4 + ,114.3 + ,86.8 + ,77.9 + ,100.62 + ,66.5 + ,109.6 + ,88.9 + ,60 + ,87.84 + ,97.2 + ,118.3 + ,110.3 + ,99.5 + ,107.31 + ,94.1 + ,127.3 + ,114.8 + ,95 + ,115.61 + ,80.7 + ,112.3 + ,94.6 + ,105.6 + ,103.43 + ,70.5 + ,114.9 + ,92 + ,102.5 + ,109.93 + ,87.8 + ,108.2 + ,93.8 + ,93.3 + ,104.43 + ,89.5 + ,105.4 + ,93.8 + ,97.3 + ,106.69 + ,99.6 + ,122.1 + ,107.6 + ,127 + ,123.1 + ,84.2 + ,113.5 + ,101 + ,111.7 + ,109.42 + ,75.1 + ,110 + ,95.4 + ,96.4 + ,101.46 + ,92 + ,125.3 + ,96.5 + ,133 + ,124.48 + ,80.8 + ,114.3 + ,89.2 + ,72.2 + ,101.49 + ,73.1 + ,115.6 + ,87.1 + ,95.8 + ,100.46 + ,99.8 + ,127.1 + ,110.5 + ,124.1 + ,115.51 + ,90 + ,123 + ,110.8 + ,127.6 + ,113.37 + ,83.1 + ,122.2 + ,104.2 + ,110.7 + ,115.4 + ,72.4 + ,126.4 + ,88.9 + ,104.6 + ,118.2 + ,78.8 + ,112.7 + ,89.8 + ,112.7 + ,106.82 + ,87.3 + ,105.8 + ,90 + ,115.3 + ,110.17 + ,91 + ,120.9 + ,93.9 + ,139.4 + ,119.91 + ,80.1 + ,116.3 + ,91.3 + ,119 + ,112.31 + ,73.6 + ,115.7 + ,87.8 + ,97.4 + ,110.62 + ,86.4 + ,127.9 + ,99.7 + ,154 + ,120.37 + ,74.5 + ,108.3 + ,73.5 + ,81.5 + ,97.94 + ,71.2 + ,121.1 + ,79.2 + ,88.8 + ,103.02 + ,92.4 + ,128.6 + ,96.9 + ,127.7 + ,116.36 + ,81.5 + ,123.1 + ,95.2 + ,105.1 + ,108.51 + ,85.3 + ,127.7 + ,95.6 + ,114.9 + ,122.54 + ,69.9 + ,126.6 + ,89.7 + ,106.4 + ,121.32 + ,84.2 + ,118.4 + ,92.8 + ,104.5 + ,112.25 + ,90.7 + ,110 + ,88 + ,121.6 + ,109.89 + ,100.3 + ,129.6 + ,101.1 + ,141.4 + ,129.58 + ,79.4 + ,115.8 + ,92.7 + ,99 + ,107.2 + ,84.8 + ,125.9 + ,95.8 + ,126.7 + ,118.68 + ,92.9 + ,128.4 + ,103.8 + ,134.1 + ,118.25 + ,81.6 + ,114 + ,81.8 + ,81.3 + ,102.67 + ,76 + ,125.6 + ,87.1 + ,88.6 + ,104.19 + ,98.7 + ,128.5 + ,105.9 + ,132.7 + ,117.74 + ,89.1 + ,136.6 + ,108.1 + ,132.9 + ,123.3 + ,88.7 + ,133.1 + ,102.6 + ,134.4 + ,122.2 + ,67.1 + ,124.6 + ,93.7 + ,103.7 + ,112.71) + ,dim=c(5 + ,72) + ,dimnames=list(c('textiel' + ,'voeding' + ,'metallurgie' + ,'voertuigen' + ,'Invoer') + ,1:72)) > y <- array(NA,dim=c(5,72),dimnames=list(c('textiel','voeding','metallurgie','voertuigen','Invoer'),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/freestat/rcomp/tmp/1o58q1229546411.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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] 5 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -0.8557, p-value = 0.3921 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.06904673 > 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/freestat/rcomp/tmp/213ke1229546411.tab") > > system("convert tmp/1o58q1229546411.ps tmp/1o58q1229546411.png") > > > proc.time() user system elapsed 0.834 0.348 0.902