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(14.2 + ,15.5 + ,-0.8 + ,100.2 + ,13.5 + ,15.1 + ,-0.2 + ,100.4 + ,11.9 + ,11.7 + ,0.2 + ,101.4 + ,14.6 + ,16.3 + ,1 + ,103 + ,15.6 + ,16.7 + ,0 + ,109.1 + ,14.1 + ,15 + ,-0.2 + ,111.4 + ,14.9 + ,14.9 + ,1 + ,114.1 + ,14.2 + ,14.6 + ,0.4 + ,121.8 + ,14.6 + ,15.3 + ,1 + ,127.6 + ,17.2 + ,17.9 + ,1.7 + ,129.9 + ,15.4 + ,16.4 + ,3.1 + ,128 + ,14.3 + ,15.4 + ,3.3 + ,123.5 + ,17.5 + ,17.9 + ,3.1 + ,124 + ,14.5 + ,15.9 + ,3.5 + ,127.4 + ,14.4 + ,13.9 + ,6 + ,127.6 + ,16.6 + ,17.8 + ,5.7 + ,128.4 + ,16.7 + ,17.9 + ,4.7 + ,131.4 + ,16.6 + ,17.4 + ,4.2 + ,135.1 + ,16.9 + ,16.7 + ,3.6 + ,134 + ,15.7 + ,16 + ,4.4 + ,144.5 + ,16.4 + ,16.6 + ,2.5 + ,147.3 + ,18.4 + ,19.1 + ,-0.6 + ,150.9 + ,16.9 + ,17.8 + ,-1.9 + ,148.7 + ,16.5 + ,17.2 + ,-1.9 + ,141.4 + ,18.3 + ,18.6 + ,0.7 + ,138.9 + ,15.1 + ,16.3 + ,-0.9 + ,139.8 + ,15.7 + ,15.1 + ,-1.7 + ,145.6 + ,18.1 + ,19.2 + ,-3.1 + ,147.9 + ,16.8 + ,17.7 + ,-2.1 + ,148.5 + ,18.9 + ,19.1 + ,0.2 + ,151.1 + ,19 + ,18 + ,1.2 + ,157.5 + ,18.1 + ,17.5 + ,3.8 + ,167.5 + ,17.8 + ,17.8 + ,4 + ,172.3 + ,21.5 + ,21.1 + ,6.6 + ,173.5 + ,17.1 + ,17.2 + ,5.3 + ,187.5 + ,18.7 + ,19.4 + ,7.6 + ,205.5 + ,19 + ,19.8 + ,4.7 + ,195.1 + ,16.4 + ,17.6 + ,6.6 + ,204.5 + ,16.9 + ,16.2 + ,4.4 + ,204.5 + ,18.6 + ,19.5 + ,4.6 + ,201.7 + ,19.3 + ,19.9 + ,6 + ,207 + ,19.4 + ,20 + ,4.8 + ,206.6 + ,17.6 + ,17.3 + ,4 + ,210.6 + ,18.6 + ,18.9 + ,2.7 + ,211.1 + ,18.1 + ,18.6 + ,3 + ,215 + ,20.4 + ,21.4 + ,4.1 + ,223.9 + ,18.1 + ,18.6 + ,4 + ,238.2 + ,19.6 + ,19.8 + ,2.7 + ,238.9 + ,19.9 + ,20.8 + ,2.6 + ,229.6 + ,19.2 + ,19.6 + ,3.1 + ,232.2 + ,17.8 + ,17.7 + ,4.4 + ,222.1 + ,19.2 + ,19.8 + ,3 + ,221.6 + ,22 + ,22.2 + ,2 + ,227.3 + ,21.1 + ,20.7 + ,1.3 + ,221 + ,19.5 + ,17.9 + ,1.5 + ,213.6 + ,22.2 + ,20.9 + ,1.3 + ,243.4 + ,20.9 + ,21.2 + ,3.2 + ,253.8 + ,22.2 + ,21.4 + ,1.8 + ,265.3 + ,23.5 + ,23 + ,3.3 + ,268.2 + ,21.5 + ,21.3 + ,1 + ,268.5 + ,24.3 + ,23.9 + ,2.4 + ,266.9 + ,22.8 + ,22.4 + ,0.4 + ,268.4 + ,20.3 + ,18.3 + ,-0.1 + ,250.8 + ,23.7 + ,22.8 + ,1.3 + ,231.2 + ,23.3 + ,22.3 + ,-1.1 + ,192 + ,19.6 + ,17.8 + ,-4.4 + ,171.4 + ,18 + ,16.4 + ,-7.5 + ,160 + ,17.3 + ,16 + ,-12.2 + ,148.1 + ,16.8 + ,16.4 + ,-14.5 + ,144.8 + ,18.2 + ,17.7 + ,-16 + ,147.2 + ,16.5 + ,16.6 + ,-16.7 + ,155.1 + ,16 + ,16.2 + ,-16.3 + ,161.1 + ,18.4 + ,18.3 + ,-16.9 + ,169.9) + ,dim=c(4 + ,73) + ,dimnames=list(c('Inv' + ,'Uitv' + ,'Ip' + ,'Pig ') + ,1:73)) > y <- array(NA,dim=c(4,73),dimnames=list(c('Inv','Uitv','Ip','Pig '),1:73)) > 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/17etu1261052540.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.9849, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8060808 > 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/2qmi31261052540.tab") > > try(system("convert tmp/17etu1261052540.ps tmp/17etu1261052540.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.510 0.226 1.013