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(286602 + ,326011 + ,20366 + ,2.00 + ,283042 + ,328282 + ,22782 + ,2.00 + ,276687 + ,317480 + ,19169 + ,2.00 + ,277915 + ,317539 + ,13807 + ,2.00 + ,277128 + ,313737 + ,29743 + ,2.00 + ,277103 + ,312276 + ,25591 + ,2.00 + ,275037 + ,309391 + ,29096 + ,2.00 + ,270150 + ,302950 + ,26482 + ,2.00 + ,267140 + ,300316 + ,22405 + ,2.00 + ,264993 + ,304035 + ,27044 + ,2.00 + ,287259 + ,333476 + ,17970 + ,2.00 + ,291186 + ,337698 + ,18730 + ,2.00 + ,292300 + ,335932 + ,19684 + ,2.00 + ,288186 + ,323931 + ,19785 + ,2.00 + ,281477 + ,313927 + ,18479 + ,2.00 + ,282656 + ,314485 + ,10698 + ,2.21 + ,280190 + ,313218 + ,31956 + ,2.25 + ,280408 + ,309664 + ,29506 + ,2.25 + ,276836 + ,302963 + ,34506 + ,2.45 + ,275216 + ,298989 + ,27165 + ,2.50 + ,274352 + ,298423 + ,26736 + ,2.50 + ,271311 + ,301631 + ,23691 + ,2.64 + ,289802 + ,329765 + ,18157 + ,2.75 + ,290726 + ,335083 + ,17328 + ,2.93 + ,292300 + ,327616 + ,18205 + ,3.00 + ,278506 + ,309119 + ,20995 + ,3.17 + ,269826 + ,295916 + ,17382 + ,3.25 + ,265861 + ,291413 + ,9367 + ,3.39 + ,269034 + ,291542 + ,31124 + ,3.50 + ,264176 + ,284678 + ,26551 + ,3.50 + ,255198 + ,276475 + ,30651 + ,3.65 + ,253353 + ,272566 + ,25859 + ,3.75 + ,246057 + ,264981 + ,25100 + ,3.75 + ,235372 + ,263290 + ,25778 + ,3.90 + ,258556 + ,296806 + ,20418 + ,4.00 + ,260993 + ,303598 + ,18688 + ,4.00 + ,254663 + ,286994 + ,20424 + ,4.00 + ,250643 + ,276427 + ,24776 + ,4.00 + ,243422 + ,266424 + ,19814 + ,4.00 + ,247105 + ,267153 + ,12738 + ,4.00 + ,248541 + ,268381 + ,31566 + ,4.00 + ,245039 + ,262522 + ,30111 + ,4.00 + ,237080 + ,255542 + ,30019 + ,4.00 + ,237085 + ,253158 + ,31934 + ,4.00 + ,225554 + ,243803 + ,25826 + ,4.00 + ,226839 + ,250741 + ,26835 + ,4.00 + ,247934 + ,280445 + ,20205 + ,4.18 + ,248333 + ,285257 + ,17789 + ,4.25 + ,246969 + ,270976 + ,20520 + ,4.25 + ,245098 + ,261076 + ,22518 + ,3.97 + ,246263 + ,255603 + ,15572 + ,3.42 + ,255765 + ,260376 + ,11509 + ,2.75 + ,264319 + ,263903 + ,25447 + ,2.31 + ,268347 + ,264291 + ,24090 + ,2.00 + ,273046 + ,263276 + ,27786 + ,1.66 + ,273963 + ,262572 + ,26195 + ,1.31 + ,267430 + ,256167 + ,20516 + ,1.09 + ,271993 + ,264221 + ,22759 + ,1.00 + ,292710 + ,293860 + ,19028 + ,1.00 + ,295881 + ,300713 + ,16971 + ,1.00) + ,dim=c(4 + ,60) + ,dimnames=list(c('nwwmb' + ,'nwwvb' + ,'inpwb' + ,'vrv') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('nwwmb','nwwvb','inpwb','vrv'),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: 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/198nb1258556727.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 = 7.6345, p-value = 2.265e-14 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6764623 > 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/26tkc1258556727.tab") > > system("convert tmp/198nb1258556727.ps tmp/198nb1258556727.png") > > > proc.time() user system elapsed 0.511 0.205 0.570