R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(117 + ,100.6 + ,118.4 + ,103.8 + ,101.2 + ,108.1 + ,100.8 + ,93.1 + ,105.4 + ,110.6 + ,84.2 + ,114.6 + ,104 + ,85.8 + ,106.9 + ,112.6 + ,91.8 + ,115.9 + ,107.3 + ,92.4 + ,109.8 + ,98.9 + ,80.3 + ,101.8 + ,109.8 + ,79.7 + ,114.2 + ,104.9 + ,62.5 + ,110.8 + ,102.2 + ,57.1 + ,108.4 + ,123.9 + ,100.8 + ,127.5 + ,124.9 + ,100.7 + ,128.6 + ,112.7 + ,86.2 + ,116.6 + ,121.9 + ,83.2 + ,127.4 + ,100.6 + ,71.7 + ,105 + ,104.3 + ,77.5 + ,108.3 + ,120.4 + ,89.8 + ,125 + ,107.5 + ,80.3 + ,111.6 + ,102.9 + ,78.7 + ,106.5 + ,125.6 + ,93.8 + ,130.3 + ,107.5 + ,57.6 + ,115 + ,108.8 + ,60.6 + ,116.1 + ,128.4 + ,91 + ,134 + ,121.1 + ,85.3 + ,126.5 + ,119.5 + ,77.4 + ,125.8 + ,128.7 + ,77.3 + ,136.4 + ,108.7 + ,68.3 + ,114.9 + ,105.5 + ,69.9 + ,110.9 + ,119.8 + ,81.7 + ,125.5 + ,111.3 + ,75.1 + ,116.8 + ,110.6 + ,69.9 + ,116.8 + ,120.1 + ,84 + ,125.5 + ,97.5 + ,54.3 + ,104.2 + ,107.7 + ,60 + ,115.1 + ,127.3 + ,89.9 + ,132.8 + ,117.2 + ,77 + ,123.3 + ,119.8 + ,85.3 + ,124.8 + ,116.2 + ,77.6 + ,122 + ,111 + ,69.2 + ,117.4 + ,112.4 + ,75.5 + ,117.9 + ,130.6 + ,85.7 + ,137.4 + ,109.1 + ,72.2 + ,114.6 + ,118.8 + ,79.9 + ,124.7 + ,123.9 + ,85.3 + ,129.6 + ,101.6 + ,52.2 + ,109.4 + ,112.8 + ,61.2 + ,120.9 + ,128 + ,82.4 + ,134.9 + ,129.6 + ,85.4 + ,136.3 + ,125.8 + ,78.2 + ,133.2 + ,119.5 + ,70.2 + ,127.2 + ,115.7 + ,70.2 + ,122.7 + ,113.6 + ,69.3 + ,120.5 + ,129.7 + ,77.5 + ,137.8 + ,112 + ,66.1 + ,119.1 + ,116.8 + ,69 + ,124.3 + ,127 + ,79.2 + ,134.4 + ,112.9 + ,58.2 + ,121.7 + ,113.3 + ,64.5 + ,121 + ,121.7 + ,76.4 + ,128.6) + ,dim=c(3 + ,60) + ,dimnames=list(c('a' + ,'b' + ,'c ') + ,1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('a','b','c '),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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/110771197375143.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 4: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd > dev.off() null device 1 > 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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 3.3812, p-value = 0.0007218 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3004536 > 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/2r84o1197375143.tab") > > system("convert tmp/110771197375143.ps tmp/110771197375143.png") > > > proc.time() user system elapsed 0.689 0.200 0.795