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(30.3 + ,122.5 + ,19 + ,80.2 + ,29 + ,122.4 + ,18 + ,74.8 + ,30.3 + ,121.9 + ,19 + ,77.8 + ,32 + ,122.2 + ,19 + ,73 + ,30.3 + ,123.7 + ,22 + ,72 + ,28 + ,122.6 + ,23 + ,75.8 + ,27.7 + ,115.7 + ,20 + ,72.6 + ,27 + ,116.1 + ,14 + ,71.9 + ,28.7 + ,120.5 + ,14 + ,74.8 + ,29.7 + ,122.6 + ,14 + ,72.9 + ,23 + ,119.9 + ,15 + ,72.9 + ,28 + ,120.7 + ,11 + ,79.9 + ,32 + ,120.2 + ,17 + ,74 + ,27 + ,122.1 + ,16 + ,76 + ,27.7 + ,119.3 + ,20 + ,69.6 + ,30.7 + ,121.7 + ,24 + ,77.3 + ,33 + ,113.5 + ,23 + ,75.2 + ,34.3 + ,123.7 + ,20 + ,75.8 + ,26 + ,123.4 + ,21 + ,77.6 + ,30.3 + ,126.4 + ,19 + ,76.7 + ,37.7 + ,124.1 + ,23 + ,77 + ,36.3 + ,125.6 + ,23 + ,77.9 + ,36.3 + ,124.8 + ,23 + ,76.7 + ,36.7 + ,123 + ,23 + ,71.9 + ,33.7 + ,126.9 + ,27 + ,73.4 + ,33.7 + ,127.3 + ,26 + ,72.5 + ,32.7 + ,129 + ,17 + ,73.7 + ,37.3 + ,126.2 + ,24 + ,69.5 + ,37 + ,125.4 + ,26 + ,74.7 + ,37.3 + ,126.3 + ,24 + ,72.5 + ,41.7 + ,126.3 + ,27 + ,72.1 + ,40.7 + ,128.4 + ,27 + ,70.7 + ,38.7 + ,127.2 + ,26 + ,71.4 + ,38.3 + ,128.5 + ,24 + ,69.5 + ,38.3 + ,129 + ,23 + ,73.5 + ,36.7 + ,128.9 + ,23 + ,72.4 + ,37.3 + ,128.3 + ,24 + ,74.5 + ,36.7 + ,124.6 + ,17 + ,72.2 + ,36 + ,126.2 + ,21 + ,73 + ,33.3 + ,129.1 + ,19 + ,73.3 + ,28.7 + ,127.3 + ,22 + ,71.3 + ,33.7 + ,129.2 + ,22 + ,73.6 + ,31 + ,130.4 + ,18 + ,71.3 + ,29.3 + ,125.9 + ,16 + ,71.2 + ,27.3 + ,135.8 + ,14 + ,81.4 + ,30.3 + ,126.4 + ,12 + ,76.1 + ,16.7 + ,129.5 + ,14 + ,71.1 + ,14.7 + ,128.4 + ,16 + ,75.7 + ,13.3 + ,125.6 + ,8 + ,70 + ,12.3 + ,127.7 + ,3 + ,68.5 + ,10 + ,126.4 + ,0 + ,56.7 + ,1.7 + ,124.2 + ,5 + ,57.9 + ,2.3 + ,126.4 + ,1 + ,58.8 + ,2.7 + ,123.7 + ,1 + ,59.3 + ,0.4 + ,121.8 + ,3 + ,61.3 + ,6.1 + ,124 + ,6 + ,62.9 + ,7.1 + ,122.7 + ,7 + ,61.4 + ,11.4 + ,122.9 + ,8 + ,64.5 + ,11.4 + ,121 + ,14 + ,63.8 + ,8.2 + ,122.8 + ,14 + ,61.6 + ,11.9 + ,122.9 + ,13 + ,64.7) + ,dim=c(4 + ,61) + ,dimnames=list(c('handel' + ,'ntdzcg' + ,'indcvtr' + ,'dzcg ') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('handel','ntdzcg','indcvtr','dzcg '),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/1e9wy1260616093.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 = 2.4358, p-value = 0.01486 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2162619 > 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/2nm9k1260616094.tab") > > system("convert tmp/1e9wy1260616093.ps tmp/1e9wy1260616093.png") > > > proc.time() user system elapsed 0.498 0.196 0.621