R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(139 + ,13.9 + ,2849.27 + ,-2.3 + ,135 + ,17.8 + ,2921.44 + ,-4.8 + ,130 + ,17.9 + ,2981.85 + ,2.3 + ,127 + ,17.4 + ,3080.58 + ,-5.2 + ,122 + ,16.7 + ,3106.22 + ,-10 + ,117 + ,16 + ,3119.31 + ,-17.1 + ,112 + ,16.6 + ,3061.26 + ,-14.4 + ,113 + ,19.1 + ,3097.31 + ,-3.9 + ,149 + ,17.8 + ,3161.69 + ,3.7 + ,157 + ,17.2 + ,3257.16 + ,6.5 + ,157 + ,18.6 + ,3277.01 + ,0.9 + ,147 + ,16.3 + ,3295.32 + ,-4.1 + ,137 + ,15.1 + ,3363.99 + ,-7 + ,132 + ,19.2 + ,3494.17 + ,-12.2 + ,125 + ,17.7 + ,3667.03 + ,-2.5 + ,123 + ,19.1 + ,3813.06 + ,4.4 + ,117 + ,18 + ,3917.96 + ,13.7 + ,114 + ,17.5 + ,3895.51 + ,12.3 + ,111 + ,17.8 + ,3801.06 + ,13.4 + ,112 + ,21.1 + ,3570.12 + ,2.2 + ,144 + ,17.2 + ,3701.61 + ,1.7 + ,150 + ,19.4 + ,3862.27 + ,-7.2 + ,149 + ,19.8 + ,3970.1 + ,-4.8 + ,134 + ,17.6 + ,4138.52 + ,-2.9 + ,123 + ,16.2 + ,4199.75 + ,-2.4 + ,116 + ,19.5 + ,4290.89 + ,-2.5 + ,117 + ,19.9 + ,4443.91 + ,-5.3 + ,111 + ,20 + ,4502.64 + ,-7.1 + ,105 + ,17.3 + ,4356.98 + ,-8 + ,102 + ,18.9 + ,4591.27 + ,-8.9 + ,95 + ,18.6 + ,4696.96 + ,-7.7 + ,93 + ,21.4 + ,4621.4 + ,-1.1 + ,124 + ,18.6 + ,4562.84 + ,4 + ,130 + ,19.8 + ,4202.52 + ,9.6 + ,124 + ,20.8 + ,4296.49 + ,10.9 + ,115 + ,19.6 + ,4435.23 + ,13 + ,106 + ,17.7 + ,4105.18 + ,14.9 + ,105 + ,19.8 + ,4116.68 + ,20.1 + ,105 + ,22.2 + ,3844.49 + ,10.8 + ,101 + ,20.7 + ,3720.98 + ,11 + ,95 + ,17.9 + ,3674.4 + ,3.8 + ,93 + ,20.9 + ,3857.62 + ,10.8 + ,84 + ,21.2 + ,3801.06 + ,7.6 + ,87 + ,21.4 + ,3504.37 + ,10.2 + ,116 + ,23 + ,3032.6 + ,2.2 + ,120 + ,21.3 + ,3047.03 + ,-0.1 + ,117 + ,23.9 + ,2962.34 + ,-1.7 + ,109 + ,22.4 + ,2197.82 + ,-4.8 + ,105 + ,18.3 + ,2014.45 + ,-9.9 + ,107 + ,22.8 + ,1862.83 + ,-13.5 + ,109 + ,22.3 + ,1905.41 + ,-18.1 + ,109 + ,17.8 + ,1810.99 + ,-18 + ,108 + ,16.4 + ,1670.07 + ,-15.7 + ,107 + ,16 + ,1864.44 + ,-15.2 + ,99 + ,16.4 + ,2052.02 + ,-15.1 + ,103 + ,17.7 + ,2029.6 + ,-17.9 + ,131 + ,16.6 + ,2070.83 + ,-14.5 + ,137 + ,16.2 + ,2293.41 + ,-9.4 + ,135 + ,18.3 + ,2443.27 + ,-4.2 + ,124 + ,17.6 + ,2513.17 + ,-2.2) + ,dim=c(4 + ,60) + ,dimnames=list(c('WLH' + ,'BH' + ,'AGM' + ,'EA') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('WLH','BH','AGM','EA'),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/freestat/rcomp/tmp/1p4w61258039179.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = -2.6121, p-value = 0.009 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.2347205 > 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/freestat/rcomp/tmp/2pg0x1258039179.tab") > > system("convert tmp/1p4w61258039179.ps tmp/1p4w61258039179.png") > > > proc.time() user system elapsed 0.721 0.302 0.879