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(392 + ,5.66 + ,111.28 + ,3353.00 + ,394 + ,5.48 + ,111.41 + ,3186.00 + ,392 + ,5.29 + ,111.62 + ,3902.00 + ,396 + ,5.18 + ,111.76 + ,4164.00 + ,392 + ,4.99 + ,111.89 + ,3499.00 + ,396 + ,4.92 + ,112.04 + ,4145.00 + ,419 + ,4.81 + ,112.12 + ,3796.00 + ,421 + ,4.79 + ,112.30 + ,3711.00 + ,420 + ,4.75 + ,112.47 + ,3949.00 + ,418 + ,4.68 + ,112.59 + ,3740.00 + ,410 + ,4.68 + ,112.78 + ,3243.00 + ,418 + ,4.73 + ,112.73 + ,4407.00 + ,426 + ,4.75 + ,112.99 + ,4814.00 + ,428 + ,4.61 + ,113.10 + ,3908.00 + ,430 + ,4.76 + ,113.33 + ,5250.00 + ,424 + ,4.74 + ,113.38 + ,3937.00 + ,423 + ,4.64 + ,113.68 + ,4004.00 + ,427 + ,4.65 + ,113.65 + ,5560.00 + ,441 + ,4.68 + ,113.81 + ,3922.00 + ,449 + ,4.78 + ,113.88 + ,3759.00 + ,452 + ,4.78 + ,114.02 + ,4138.00 + ,462 + ,4.95 + ,114.25 + ,4634.00 + ,455 + ,4.96 + ,114.28 + ,3996.00 + ,461 + ,4.71 + ,114.38 + ,4308.00 + ,461 + ,4.45 + ,114.73 + ,4143.00 + ,463 + ,4.38 + ,114.97 + ,4429.00 + ,462 + ,4.32 + ,115.05 + ,5219.00 + ,456 + ,4.27 + ,115.29 + ,4929.00 + ,455 + ,4.17 + ,115.37 + ,5755.00 + ,456 + ,4.07 + ,115.54 + ,5592.00 + ,472 + ,4.02 + ,115.76 + ,4163.00 + ,472 + ,3.95 + ,115.92 + ,4962.00 + ,471 + ,3.90 + ,116.02 + ,5208.00 + ,465 + ,3.90 + ,116.21 + ,4755.00 + ,459 + ,3.88 + ,116.26 + ,4491.00 + ,465 + ,3.89 + ,116.51 + ,5732.00 + ,468 + ,3.89 + ,104.71 + ,5731.00 + ,467 + ,3.93 + ,105.35 + ,5040.00 + ,463 + ,3.94 + ,106.31 + ,6102.00 + ,460 + ,3.97 + ,106.26 + ,4904.00 + ,462 + ,4.00 + ,106.97 + ,5369.00 + ,461 + ,4.04 + ,107.04 + ,5578.00 + ,476 + ,4.18 + ,106.98 + ,4619.00 + ,476 + ,4.32 + ,107.05 + ,4731.00 + ,471 + ,4.37 + ,107.33 + ,5011.00 + ,453 + ,4.40 + ,107.36 + ,5299.00 + ,443 + ,4.38 + ,107.28 + ,4146.00 + ,442 + ,4.36 + ,107.58 + ,4625.00 + ,444 + ,4.36 + ,109.03 + ,4736.00 + ,438 + ,4.40 + ,110.43 + ,4219.00 + ,427 + ,4.41 + ,111.01 + ,5116.00 + ,424 + ,4.43 + ,111.01 + ,4205.00 + ,416 + ,4.42 + ,110.76 + ,4121.00 + ,406 + ,4.46 + ,111.13 + ,5103.00 + ,431 + ,4.61 + ,111.07 + ,4300.00 + ,434 + ,4.78 + ,111.09 + ,4578.00 + ,418 + ,4.88 + ,110.96 + ,3809.00 + ,412 + ,4.95 + ,110.64 + ,5526.00 + ,404 + ,4.95 + ,110.62 + ,4247.00 + ,409 + ,4.93 + ,110.58 + ,3830.00 + ,412 + ,4.93 + ,111.33 + ,4394.00) + ,dim=c(4 + ,61) + ,dimnames=list(c('wkl' + ,'rtar' + ,'hpi' + ,'bv') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('wkl','rtar','hpi','bv'),1:61)) > 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/1c7gg1258130160.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 = -6.8575, p-value = 7.01e-12 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.608456 > 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/2hwqx1258130160.tab") > > system("convert tmp/1c7gg1258130160.ps tmp/1c7gg1258130160.png") > > > proc.time() user system elapsed 0.526 0.233 1.165