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(98.8 + ,101.7 + ,104.8 + ,128.7 + ,100.5 + ,102.8 + ,105.6 + ,136.9 + ,110.4 + ,109.2 + ,118.3 + ,156.9 + ,96.4 + ,88.5 + ,89.9 + ,109.1 + ,101.9 + ,93.9 + ,90.2 + ,122.3 + ,106.2 + ,97.4 + ,107 + ,123.9 + ,81 + ,86.7 + ,64.5 + ,90.9 + ,94.7 + ,80.1 + ,92.6 + ,77.9 + ,101 + ,104.1 + ,95.8 + ,120.3 + ,109.4 + ,108.9 + ,94.3 + ,118.9 + ,102.3 + ,94.1 + ,91.2 + ,125.5 + ,90.7 + ,72.4 + ,86.3 + ,98.9 + ,96.2 + ,94.7 + ,77.6 + ,102.9 + ,96.1 + ,95.3 + ,82.5 + ,105.9 + ,106 + ,96.4 + ,97.7 + ,117.6 + ,103.1 + ,91.7 + ,83.3 + ,113.6 + ,102 + ,84 + ,84.2 + ,115.9 + ,104.7 + ,86.2 + ,92.8 + ,118.9 + ,86 + ,88.8 + ,77.4 + ,77.6 + ,92.1 + ,74.9 + ,72.5 + ,81.2 + ,106.9 + ,111.3 + ,88.8 + ,123.1 + ,112.6 + ,103.6 + ,93.4 + ,136.6 + ,101.7 + ,83.4 + ,92.6 + ,112.1 + ,92 + ,69 + ,90.7 + ,95.1 + ,97.4 + ,96.7 + ,81.6 + ,96.3 + ,97 + ,94.7 + ,84.1 + ,105.7 + ,105.4 + ,90.1 + ,88.1 + ,115.8 + ,102.7 + ,87.9 + ,85.3 + ,105.7 + ,98.1 + ,76.3 + ,82.9 + ,105.7 + ,104.5 + ,82.6 + ,84.8 + ,111.1 + ,87.4 + ,81.8 + ,71.2 + ,82.4 + ,89.9 + ,66.2 + ,68.9 + ,60 + ,109.8 + ,97.8 + ,94.3 + ,107.3 + ,111.7 + ,94.7 + ,97.6 + ,99.3 + ,98.6 + ,81.2 + ,85.6 + ,113.5 + ,96.9 + ,70.6 + ,91.9 + ,108.9 + ,95.1 + ,87.6 + ,75.8 + ,100.2 + ,97 + ,89.3 + ,79.8 + ,103.9 + ,112.7 + ,99.6 + ,99 + ,138.7 + ,102.9 + ,83.9 + ,88.5 + ,120.2 + ,97.4 + ,74.7 + ,86.7 + ,100.2 + ,111.4 + ,91.2 + ,97.9 + ,143.2 + ,87.4 + ,80.8 + ,94.3 + ,70.9 + ,96.8 + ,72.3 + ,72.9 + ,85.2 + ,114.1 + ,99.7 + ,91.8 + ,133 + ,110.3 + ,90.1 + ,93.2 + ,136.6 + ,103.9 + ,83.1 + ,86.5 + ,117.9 + ,101.6 + ,71.9 + ,98.9 + ,106.3 + ,94.6 + ,78.6 + ,77.2 + ,122.3 + ,95.9 + ,87.2 + ,79.4 + ,125.5 + ,104.7 + ,90.6 + ,90.4 + ,148.4 + ,102.8 + ,80 + ,81.4 + ,126.3 + ,98.1 + ,73.1 + ,85.8 + ,99.6 + ,113.9 + ,85.6 + ,103.6 + ,140.4 + ,80.9 + ,73.8 + ,73.6 + ,80.3 + ,95.7 + ,70.6 + ,75.7 + ,92.6 + ,113.2 + ,91.8 + ,99.2 + ,138.5 + ,105.9 + ,81.3 + ,88.7 + ,110.9 + ,108.8 + ,85.2 + ,94.6 + ,119.6 + ,102.3 + ,69.6 + ,98.7 + ,105) + ,dim=c(4 + ,60) + ,dimnames=list(c('TotaleProductie' + ,'TextielEnKleding' + ,'ElectronischeEnElectrischeApparaten' + ,'AutoIndustrie') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('TotaleProductie','TextielEnKleding','ElectronischeEnElectrischeApparaten','AutoIndustrie'),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/19fn51257952026.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 = 4.2423, p-value = 2.212e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3768773 > 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/2icx21257952026.tab") > system("convert tmp/19fn51257952026.ps tmp/19fn51257952026.png") > > > proc.time() user system elapsed 0.506 0.220 0.605