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(110.2 + ,101 + ,94.7 + ,104.8 + ,125.9 + ,113.2 + ,112.9 + ,105.6 + ,100.1 + ,101 + ,99.2 + ,118.3 + ,106.4 + ,105.7 + ,105.6 + ,89.9 + ,114.8 + ,113.9 + ,113 + ,90.2 + ,81.3 + ,86.4 + ,83.1 + ,107 + ,87 + ,96.5 + ,81.1 + ,64.5 + ,104.2 + ,103.3 + ,96.9 + ,92.6 + ,108 + ,114.9 + ,104.3 + ,95.8 + ,105 + ,105.8 + ,97.7 + ,94.3 + ,94.5 + ,94.2 + ,102.6 + ,91.2 + ,92 + ,98.4 + ,89.9 + ,86.3 + ,95.9 + ,99.4 + ,96 + ,77.6 + ,108.8 + ,108.8 + ,112.7 + ,82.5 + ,103.4 + ,112.6 + ,107.1 + ,97.7 + ,102.1 + ,104.4 + ,106.2 + ,83.3 + ,110.1 + ,112.2 + ,121 + ,84.2 + ,83.2 + ,81.1 + ,101.2 + ,92.8 + ,82.7 + ,97.1 + ,83.2 + ,77.4 + ,106.8 + ,112.6 + ,105.1 + ,72.5 + ,113.7 + ,113.8 + ,113.3 + ,88.8 + ,102.5 + ,107.8 + ,99.1 + ,93.4 + ,96.6 + ,103.2 + ,100.3 + ,92.6 + ,92.1 + ,103.3 + ,93.5 + ,90.7 + ,95.6 + ,101.2 + ,98.8 + ,81.6 + ,102.3 + ,107.7 + ,106.2 + ,84.1 + ,98.6 + ,110.4 + ,98.3 + ,88.1 + ,98.2 + ,101.9 + ,102.1 + ,85.3 + ,104.5 + ,115.9 + ,117.1 + ,82.9 + ,84 + ,89.9 + ,101.5 + ,84.8 + ,73.8 + ,88.6 + ,80.5 + ,71.2 + ,103.9 + ,117.2 + ,105.9 + ,68.9 + ,106 + ,123.9 + ,109.5 + ,94.3 + ,97.2 + ,100 + ,97.2 + ,97.6 + ,102.6 + ,103.6 + ,114.5 + ,85.6 + ,89 + ,94.1 + ,93.5 + ,91.9 + ,93.8 + ,98.7 + ,100.9 + ,75.8 + ,116.7 + ,119.5 + ,121.1 + ,79.8 + ,106.8 + ,112.7 + ,116.5 + ,99 + ,98.5 + ,104.4 + ,109.3 + ,88.5 + ,118.7 + ,124.7 + ,118.1 + ,86.7 + ,90 + ,89.1 + ,108.3 + ,97.9 + ,91.9 + ,97 + ,105.4 + ,94.3 + ,113.3 + ,121.6 + ,116.2 + ,72.9 + ,113.1 + ,118.8 + ,111.2 + ,91.8 + ,104.1 + ,114 + ,105.8 + ,93.2 + ,108.7 + ,111.5 + ,122.7 + ,86.5 + ,96.7 + ,97.2 + ,99.5 + ,98.9 + ,101 + ,102.5 + ,107.9 + ,77.2 + ,116.9 + ,113.4 + ,124.6 + ,79.4 + ,105.8 + ,109.8 + ,115 + ,90.4 + ,99 + ,104.9 + ,110.3 + ,81.4 + ,129.4 + ,126.1 + ,132.7 + ,85.8 + ,83 + ,80 + ,99.7 + ,103.6 + ,88.9 + ,96.8 + ,96.5 + ,73.6 + ,115.9 + ,117.2 + ,118.7 + ,75.7 + ,104.2 + ,112.3 + ,112.9 + ,99.2 + ,113.4 + ,117.3 + ,130.5 + ,88.7 + ,112.2 + ,111.1 + ,137.9 + ,94.6 + ,100.8 + ,102.2 + ,115 + ,98.7 + ,107.3 + ,104.3 + ,116.8 + ,84.2 + ,126.6 + ,122.9 + ,140.9 + ,87.7 + ,102.9 + ,107.6 + ,120.7 + ,103.3 + ,117.9 + ,121.3 + ,134.2 + ,88.2 + ,128.8 + ,131.5 + ,147.3 + ,93.4 + ,87.5 + ,89 + ,112.4 + ,106.3 + ,93.8 + ,104.4 + ,107.1 + ,73.1) + ,dim=c(4 + ,67) + ,dimnames=list(c('1' + ,'2' + ,'3' + ,'4') + ,1:67)) > y <- array(NA,dim=c(4,67),dimnames=list(c('1','2','3','4'),1:67)) > 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/19kax1196187627.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 > 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 = 8.741, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7320946 > 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/2vyyd1196187627.tab") > > system("convert tmp/19kax1196187627.ps tmp/19kax1196187627.png") > > > proc.time() user system elapsed 0.755 0.212 0.832