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(244752 + ,274412 + ,110.6 + ,1.3 + ,244576 + ,272433 + ,104 + ,1.3 + ,241572 + ,268361 + ,112.6 + ,1.4 + ,240541 + ,268586 + ,107.3 + ,2 + ,236089 + ,264768 + ,98.9 + ,1.7 + ,236997 + ,269974 + ,109.8 + ,1.8 + ,264579 + ,304744 + ,104.9 + ,1.7 + ,270349 + ,309365 + ,102.2 + ,1.6 + ,269645 + ,308347 + ,123.9 + ,1.7 + ,267037 + ,298427 + ,124.9 + ,1.9 + ,258113 + ,289231 + ,112.7 + ,1.8 + ,262813 + ,291975 + ,121.9 + ,1.7 + ,267413 + ,294912 + ,100.6 + ,1.6 + ,267366 + ,293488 + ,104.3 + ,1.8 + ,264777 + ,290555 + ,120.4 + ,1.6 + ,258863 + ,284736 + ,107.5 + ,1.5 + ,254844 + ,281818 + ,102.9 + ,1.5 + ,254868 + ,287854 + ,125.6 + ,1.3 + ,277267 + ,316263 + ,107.5 + ,1.4 + ,285351 + ,325412 + ,108.8 + ,1.4 + ,286602 + ,326011 + ,128.4 + ,1.3 + ,283042 + ,328282 + ,121.1 + ,1.3 + ,276687 + ,317480 + ,119.5 + ,1.2 + ,277915 + ,317539 + ,128.7 + ,1.1 + ,277128 + ,313737 + ,108.7 + ,1.4 + ,277103 + ,312276 + ,105.5 + ,1.2 + ,275037 + ,309391 + ,119.8 + ,1.5 + ,270150 + ,302950 + ,111.3 + ,1.1 + ,267140 + ,300316 + ,110.6 + ,1.3 + ,264993 + ,304035 + ,120.1 + ,1.5 + ,287259 + ,333476 + ,97.5 + ,1.1 + ,291186 + ,337698 + ,107.7 + ,1.4 + ,292300 + ,335932 + ,127.3 + ,1.3 + ,288186 + ,323931 + ,117.2 + ,1.5 + ,281477 + ,313927 + ,119.8 + ,1.6 + ,282656 + ,314485 + ,116.2 + ,1.7 + ,280190 + ,313218 + ,111 + ,1.1 + ,280408 + ,309664 + ,112.4 + ,1.6 + ,276836 + ,302963 + ,130.6 + ,1.3 + ,275216 + ,298989 + ,109.1 + ,1.7 + ,274352 + ,298423 + ,118.8 + ,1.6 + ,271311 + ,301631 + ,123.9 + ,1.7 + ,289802 + ,329765 + ,101.6 + ,1.9 + ,290726 + ,335083 + ,112.8 + ,1.8 + ,292300 + ,327616 + ,128 + ,1.9 + ,278506 + ,309119 + ,129.6 + ,1.6 + ,269826 + ,295916 + ,125.8 + ,1.5 + ,265861 + ,291413 + ,119.5 + ,1.6 + ,269034 + ,291542 + ,115.7 + ,1.6 + ,264176 + ,284678 + ,113.6 + ,1.7 + ,255198 + ,276475 + ,129.7 + ,2 + ,253353 + ,272566 + ,112 + ,2 + ,246057 + ,264981 + ,116.8 + ,1.9 + ,235372 + ,263290 + ,127 + ,1.7 + ,258556 + ,296806 + ,112.1 + ,1.8 + ,260993 + ,303598 + ,114.2 + ,1.9 + ,254663 + ,286994 + ,121.1 + ,1.7 + ,250643 + ,276427 + ,131.6 + ,2 + ,243422 + ,266424 + ,125 + ,2.1 + ,247105 + ,267153 + ,120.4 + ,2.4 + ,248541 + ,268381 + ,117.7 + ,2.5 + ,245039 + ,262522 + ,117.5 + ,2.5 + ,237080 + ,255542 + ,120.6 + ,2.6 + ,237085 + ,253158 + ,127.5 + ,2.2 + ,225554 + ,243803 + ,112.3 + ,2.5 + ,226839 + ,250741 + ,124.5 + ,2.8 + ,247934 + ,280445 + ,115.2 + ,2.8 + ,248333 + ,285257 + ,104.7 + ,2.9 + ,246969 + ,270976 + ,130.9 + ,3 + ,245098 + ,261076 + ,129.2 + ,3.1 + ,246263 + ,255603 + ,113.5 + ,2.9 + ,255765 + ,260376 + ,125.6 + ,2.7 + ,264319 + ,263903 + ,107.6 + ,2.2 + ,268347 + ,264291 + ,107 + ,2.5 + ,273046 + ,263276 + ,121.6 + ,2.3 + ,273963 + ,262572 + ,110.7 + ,2.6 + ,267430 + ,256167 + ,106.3 + ,2.3 + ,271993 + ,264221 + ,118.6 + ,2.2 + ,292710 + ,293860 + ,104.6 + ,1.8) + ,dim=c(4 + ,79) + ,dimnames=list(c('m' + ,'v' + ,'g' + ,'p') + ,1:79)) > y <- array(NA,dim=c(4,79),dimnames=list(c('m','v','g','p'),1:79)) > 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/16p5d1257940498.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 = 8.8985, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6823568 > 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/2a8r31257940498.tab") > system("convert tmp/16p5d1257940498.ps tmp/16p5d1257940498.png") > > > proc.time() user system elapsed 0.504 0.213 0.875