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(97.4 + ,106.7 + ,96.7 + ,116.7 + ,97 + ,104.7 + ,94.7 + ,109 + ,105.4 + ,107.4 + ,90.1 + ,119.5 + ,102.7 + ,109.8 + ,87.9 + ,115.1 + ,98.1 + ,103.4 + ,76.3 + ,107.1 + ,104.5 + ,114.8 + ,82.6 + ,109.7 + ,87.4 + ,114.3 + ,81.8 + ,110.4 + ,89.9 + ,109.6 + ,66.2 + ,105 + ,109.8 + ,118.3 + ,97.8 + ,115.8 + ,111.7 + ,127.3 + ,94.7 + ,116.4 + ,98.6 + ,112.3 + ,81.2 + ,111.1 + ,96.9 + ,114.9 + ,70.6 + ,119.5 + ,95.1 + ,108.2 + ,87.6 + ,110.9 + ,97 + ,105.4 + ,89.3 + ,115.1 + ,112.7 + ,122.1 + ,99.6 + ,125.2 + ,102.9 + ,113.5 + ,83.9 + ,116 + ,97.4 + ,110 + ,74.7 + ,112.9 + ,111.4 + ,125.3 + ,91.2 + ,121.7 + ,87.4 + ,114.3 + ,80.8 + ,123.2 + ,96.8 + ,115.6 + ,72.3 + ,116.6 + ,114.1 + ,127.1 + ,99.7 + ,136.2 + ,110.3 + ,123 + ,90.1 + ,120.9 + ,103.9 + ,122.2 + ,83.1 + ,119.6 + ,101.6 + ,126.4 + ,71.9 + ,125.9 + ,94.6 + ,112.7 + ,78.6 + ,116.1 + ,95.9 + ,105.8 + ,87.2 + ,107.5 + ,104.7 + ,120.9 + ,90.6 + ,116.7 + ,102.8 + ,116.3 + ,80 + ,112.5 + ,98.1 + ,115.7 + ,73.1 + ,113 + ,113.9 + ,127.9 + ,85.6 + ,126.4 + ,80.9 + ,108.3 + ,73.8 + ,114.1 + ,95.7 + ,121.1 + ,70.6 + ,112.5 + ,113.2 + ,128.6 + ,91.8 + ,112.4 + ,105.9 + ,123.1 + ,81.3 + ,113.1 + ,108.8 + ,127.7 + ,85.2 + ,116.3 + ,102.3 + ,126.6 + ,69.6 + ,111.7 + ,99 + ,118.4 + ,83.3 + ,118.8 + ,100.7 + ,110 + ,89.8 + ,116.5 + ,115.5 + ,129.6 + ,99.5 + ,125.1 + ,100.7 + ,115.8 + ,78.9 + ,113.1 + ,109.9 + ,125.9 + ,83.8 + ,119.6 + ,114.6 + ,128.4 + ,92 + ,114.4 + ,85.4 + ,114 + ,80.9 + ,114 + ,100.5 + ,125.6 + ,74.6 + ,117.8 + ,114.8 + ,128.5 + ,97.9 + ,117 + ,116.5 + ,136.6 + ,88.3 + ,120.9 + ,112.9 + ,133.1 + ,88.1 + ,115 + ,102 + ,124.6 + ,66.4 + ,117.3 + ,106 + ,123.5 + ,92.3 + ,119.4 + ,105.3 + ,117.2 + ,95.6 + ,114.9 + ,118.8 + ,135.5 + ,99.7 + ,125.8 + ,106.1 + ,124.8 + ,78.9 + ,117.6 + ,109.3 + ,127.8 + ,79.4 + ,117.6 + ,117.2 + ,133.1 + ,87.8 + ,114.9 + ,92.5 + ,125.7 + ,80.5 + ,121.9 + ,104.2 + ,128.4 + ,71.8 + ,117 + ,112.5 + ,131.9 + ,89.2 + ,106.4 + ,122.4 + ,146.3 + ,96.4 + ,110.5 + ,113.3 + ,140.6 + ,83.5 + ,113.6) + ,dim=c(4 + ,59) + ,dimnames=list(c('TIip' + ,'ipv&g' + ,'ipk&t' + ,'ipchn') + ,1:59)) > y <- array(NA,dim=c(4,59),dimnames=list(c('TIip','ipv&g','ipk&t','ipchn'),1:59)) > 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/1g3921258282685.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 = 6.7173, p-value = 1.851e-11 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6018166 > 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/20b791258282685.tab") > > system("convert tmp/1g3921258282685.ps tmp/1g3921258282685.png") > > > proc.time() user system elapsed 0.498 0.204 0.561