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(2849.27 + ,13.9 + ,139 + ,455 + ,2921.44 + ,17.8 + ,135 + ,461 + ,2981.85 + ,17.9 + ,130 + ,461 + ,3080.58 + ,17.4 + ,127 + ,463 + ,3106.22 + ,16.7 + ,122 + ,462 + ,3119.31 + ,16 + ,117 + ,456 + ,3061.26 + ,16.6 + ,112 + ,455 + ,3097.31 + ,19.1 + ,113 + ,456 + ,3161.69 + ,17.8 + ,149 + ,472 + ,3257.16 + ,17.2 + ,157 + ,472 + ,3277.01 + ,18.6 + ,157 + ,471 + ,3295.32 + ,16.3 + ,147 + ,465 + ,3363.99 + ,15.1 + ,137 + ,459 + ,3494.17 + ,19.2 + ,132 + ,465 + ,3667.03 + ,17.7 + ,125 + ,468 + ,3813.06 + ,19.1 + ,123 + ,467 + ,3917.96 + ,18 + ,117 + ,463 + ,3895.51 + ,17.5 + ,114 + ,460 + ,3801.06 + ,17.8 + ,111 + ,462 + ,3570.12 + ,21.1 + ,112 + ,461 + ,3701.61 + ,17.2 + ,144 + ,476 + ,3862.27 + ,19.4 + ,150 + ,476 + ,3970.1 + ,19.8 + ,149 + ,471 + ,4138.52 + ,17.6 + ,134 + ,453 + ,4199.75 + ,16.2 + ,123 + ,443 + ,4290.89 + ,19.5 + ,116 + ,442 + ,4443.91 + ,19.9 + ,117 + ,444 + ,4502.64 + ,20 + ,111 + ,438 + ,4356.98 + ,17.3 + ,105 + ,427 + ,4591.27 + ,18.9 + ,102 + ,424 + ,4696.96 + ,18.6 + ,95 + ,416 + ,4621.4 + ,21.4 + ,93 + ,406 + ,4562.84 + ,18.6 + ,124 + ,431 + ,4202.52 + ,19.8 + ,130 + ,434 + ,4296.49 + ,20.8 + ,124 + ,418 + ,4435.23 + ,19.6 + ,115 + ,412 + ,4105.18 + ,17.7 + ,106 + ,404 + ,4116.68 + ,19.8 + ,105 + ,409 + ,3844.49 + ,22.2 + ,105 + ,412 + ,3720.98 + ,20.7 + ,101 + ,406 + ,3674.4 + ,17.9 + ,95 + ,398 + ,3857.62 + ,20.9 + ,93 + ,397 + ,3801.06 + ,21.2 + ,84 + ,385 + ,3504.37 + ,21.4 + ,87 + ,390 + ,3032.6 + ,23 + ,116 + ,413 + ,3047.03 + ,21.3 + ,120 + ,413 + ,2962.34 + ,23.9 + ,117 + ,401 + ,2197.82 + ,22.4 + ,109 + ,397 + ,2014.45 + ,18.3 + ,105 + ,397 + ,1862.83 + ,22.8 + ,107 + ,409 + ,1905.41 + ,22.3 + ,109 + ,419 + ,1810.99 + ,17.8 + ,109 + ,424 + ,1670.07 + ,16.4 + ,108 + ,428 + ,1864.44 + ,16 + ,107 + ,430 + ,2052.02 + ,16.4 + ,99 + ,424 + ,2029.6 + ,17.7 + ,103 + ,433 + ,2070.83 + ,16.6 + ,131 + ,456 + ,2293.41 + ,16.2 + ,137 + ,459 + ,2443.27 + ,18.3 + ,135 + ,446 + ,2513.17 + ,17.6 + ,124 + ,441) + ,dim=c(4 + ,60) + ,dimnames=list(c('AGM' + ,'BH' + ,'WLHK' + ,'WLHV') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('AGM','BH','WLHK','WLHV'),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/19dr01258042924.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 = 1.8125, p-value = 0.06991 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1616429 > 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/2xlwb1258042924.tab") > > system("convert tmp/19dr01258042924.ps tmp/19dr01258042924.png") > > > proc.time() user system elapsed 0.496 0.217 0.573