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(106.5789 + ,87.60884 + ,111.9533528 + ,93.76979937 + ,101.3158 + ,80.37508 + ,103.6443149 + ,89.96832101 + ,98.68421 + ,73.94508 + ,96.20991254 + ,86.16684266 + ,100 + ,73.94508 + ,93.14868805 + ,87.43400211 + ,102.6316 + ,76.35633 + ,90.52478134 + ,91.23548046 + ,102.6316 + ,77.16008 + ,89.21282799 + ,93.76979937 + ,102.6316 + ,76.35633 + ,88.7755102 + ,92.50263992 + ,98.68421 + ,73.14133 + ,89.21282799 + ,87.43400211 + ,98.68421 + ,71.53382 + ,86.58892128 + ,87.43400211 + ,93.42105 + ,72.33758 + ,85.27696793 + ,86.16684266 + ,98.68421 + ,81.17883 + ,101.0204082 + ,89.96832101 + ,98.68421 + ,82.78634 + ,102.7696793 + ,91.23548046 + ,100 + ,81.98259 + ,102.7696793 + ,89.96832101 + ,101.3158 + ,77.16008 + ,100.1457726 + ,88.70116156 + ,101.3158 + ,73.94508 + ,95.77259475 + ,87.43400211 + ,103.9474 + ,74.74883 + ,94.02332362 + ,89.96832101 + ,106.5789 + ,75.55258 + ,89.65014577 + ,92.50263992 + ,107.8947 + ,75.55258 + ,88.33819242 + ,95.03695882 + ,107.8947 + ,73.94508 + ,84.83965015 + ,95.03695882 + ,107.8947 + ,72.33758 + ,83.96501458 + ,95.03695882 + ,103.9474 + ,72.33758 + ,82.21574344 + ,92.50263992 + ,96.05263 + ,72.33758 + ,82.21574344 + ,88.70116156 + ,90.78947 + ,78.76758 + ,98.83381924 + ,84.89968321 + ,86.84211 + ,80.37508 + ,101.8950437 + ,82.36536431 + ,88.15789 + ,78.76758 + ,100.5830904 + ,82.36536431 + ,90.78947 + ,74.74883 + ,93.58600583 + ,82.36536431 + ,92.10526 + ,72.33758 + ,87.02623907 + ,83.63252376 + ,93.42105 + ,72.33758 + ,82.21574344 + ,86.16684266 + ,94.73684 + ,73.14133 + ,81.34110787 + ,87.43400211 + ,93.42105 + ,73.14133 + ,80.4664723 + ,87.43400211 + ,90.78947 + ,73.14133 + ,81.34110787 + ,86.16684266 + ,92.10526 + ,73.94508 + ,87.02623907 + ,86.16684266 + ,89.47368 + ,70.73007 + ,83.96501458 + ,82.36536431 + ,84.21053 + ,66.71132 + ,80.4664723 + ,77.2967265 + ,88.15789 + ,67.51507 + ,92.27405248 + ,77.2967265 + ,86.84211 + ,65.10382 + ,89.65014577 + ,74.7624076 + ,84.21053 + ,61.88881 + ,83.52769679 + ,72.2280887 + ,82.89474 + ,63.49632 + ,79.15451895 + ,74.7624076 + ,81.57895 + ,63.49632 + ,74.34402332 + ,74.7624076 + ,85.52632 + ,64.30007 + ,74.78134111 + ,77.2967265 + ,89.47368 + ,63.49632 + ,76.09329446 + ,79.83104541 + ,89.47368 + ,61.08506 + ,73.46938776 + ,78.56388596 + ,84.21053 + ,57.06631 + ,66.90962099 + ,74.7624076 + ,80.26316 + ,54.65506 + ,62.53644315 + ,72.2280887 + ,76.31579 + ,52.2438 + ,58.60058309 + ,68.42661035 + ,80.26316 + ,55.45881 + ,66.90962099 + ,70.96092925 + ,94.73684 + ,65.90757 + ,96.64723032 + ,78.56388596 + ,96.05263 + ,69.92632 + ,103.6443149 + ,79.83104541 + ,90.78947 + ,66.71132 + ,97.0845481 + ,76.02956705 + ,80.26316 + ,63.49632 + ,85.27696793 + ,70.96092925 + ,76.31579 + ,60.28131 + ,72.59475219 + ,69.6937698 + ,81.57895 + ,62.69257 + ,75.65597668 + ,74.7624076 + ,93.42105 + ,66.71132 + ,86.58892128 + ,82.36536431 + ,101.3158 + ,67.51507 + ,92.71137026 + ,86.16684266 + ,103.9474 + ,65.90757 + ,94.02332362 + ,86.16684266 + ,101.3158 + ,61.88881 + ,90.08746356 + ,82.36536431 + ,97.36842 + ,57.87006 + ,83.52769679 + ,78.56388596 + ,98.68421 + ,58.67381 + ,85.71428571 + ,78.56388596 + ,105.2632 + ,65.10382 + ,102.7696793 + ,82.36536431 + ,106.5789 + ,68.31882 + ,104.9562682 + ,84.89968321) + ,dim=c(4 + ,60) + ,dimnames=list(c('wlhm' + ,'wlhv' + ,'wlh<25j' + ,'wlh>25j') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('wlhm','wlhv','wlh<25j','wlh>25j'),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/16vyc1261577093.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 = 4.3649, p-value = 1.272e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3983688 > 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/2kbhq1261577093.tab") > > try(system("convert tmp/16vyc1261577093.ps tmp/16vyc1261577093.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.503 0.203 0.651