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(1.2176 + ,613.70 + ,913.90 + ,699.8 + ,1.2218 + ,759.20 + ,888.00 + ,871.2 + ,1.2490 + ,816.40 + ,973.80 + ,842.6 + ,1.2991 + ,736.80 + ,927.60 + ,809.2 + ,1.3408 + ,680.10 + ,833.00 + ,847.1 + ,1.3119 + ,736.50 + ,879.50 + ,857 + ,1.3014 + ,637.20 + ,797.30 + ,839.9 + ,1.3201 + ,801.90 + ,834.50 + ,967.4 + ,1.2938 + ,772.30 + ,735.10 + ,1037.2 + ,1.2694 + ,897.30 + ,835.00 + ,1062.3 + ,1.2165 + ,792.10 + ,892.80 + ,899.3 + ,1.2037 + ,826.80 + ,697.20 + ,1129.6 + ,1.2292 + ,666.80 + ,821.10 + ,845.7 + ,1.2256 + ,906.60 + ,732.70 + ,1173.9 + ,1.2015 + ,871.40 + ,797.60 + ,1073.8 + ,1.1786 + ,891.00 + ,866.30 + ,1021.7 + ,1.1856 + ,739.20 + ,826.30 + ,912.9 + ,1.2103 + ,833.60 + ,778.60 + ,1055 + ,1.1938 + ,715.60 + ,779.20 + ,936.4 + ,1.2020 + ,871.60 + ,951.00 + ,920.6 + ,1.2271 + ,751.60 + ,692.30 + ,1059.3 + ,1.2770 + ,1005.5 + ,841.40 + ,1164.1 + ,1.2650 + ,681.20 + ,857.30 + ,823.9 + ,1.2684 + ,837.30 + ,760.70 + ,1076.6 + ,1.2811 + ,674.40 + ,841.20 + ,833.5 + ,1.2727 + ,806.30 + ,810.30 + ,996 + ,1.2611 + ,860.20 + ,1007.4 + ,852.8 + ,1.2881 + ,689.80 + ,931.30 + ,758.5 + ,1.3213 + ,691.60 + ,931.20 + ,760.4 + ,1.2999 + ,682.60 + ,855.80 + ,826.8 + ,1.3074 + ,800.10 + ,858.40 + ,941.7 + ,1.3242 + ,1023.7 + ,925.90 + ,1097.8 + ,1.3516 + ,733.50 + ,930.70 + ,802.8 + ,1.3511 + ,875.30 + ,1035.6 + ,839.7 + ,1.3419 + ,770.20 + ,979.20 + ,791 + ,1.3716 + ,1005.7 + ,942.60 + ,1063.1 + ,1.3622 + ,982.30 + ,843.90 + ,1138.4 + ,1.3896 + ,742.90 + ,854.30 + ,888.6 + ,1.4227 + ,977.60 + ,1046.5 + ,931.1 + ,1.4684 + ,823.90 + ,960.70 + ,863.2 + ,1.4570 + ,791.60 + ,855.40 + ,936.2 + ,1.4718 + ,755.50 + ,1053.8 + ,701.7 + ,1.4748 + ,748.00 + ,874.20 + ,873.8 + ,1.5527 + ,763.80 + ,1067.0 + ,696.8 + ,1.5750 + ,871.50 + ,1213.4 + ,658.1 + ,1.5557 + ,837.00 + ,1130.3 + ,706.7 + ,1.5553 + ,726.10 + ,1267.6 + ,458.5 + ,1.5770 + ,899.30 + ,1213.6 + ,685.7 + ,1.4975 + ,630.70 + ,970.60 + ,660.1 + ,1.4369 + ,985.80 + ,1210.9 + ,774.9 + ,1.3322 + ,884.10 + ,1096.7 + ,787.4 + ,1.2732 + ,606.00 + ,1119.1 + ,486.9 + ,1.3449 + ,582.60 + ,1271.8 + ,310.8 + ,1.3239 + ,593.40 + ,973.90 + ,619.5 + ,1.2785 + ,620.60 + ,1070.4 + ,550.2 + ,1.3050 + ,621.60 + ,1158.2 + ,463.4 + ,1.3190 + ,620.30 + ,989.90 + ,630.4 + ,1.3650 + ,639.90 + ,910.90 + ,729 + ,1.4016 + ,560.70 + ,1075.1 + ,485.6 + ,1.4088 + ,489.80 + ,1036.1 + ,453.7) + ,dim=c(4 + ,60) + ,dimnames=list(c('WK' + ,'UIT' + ,'IN' + ,'HB') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('WK','UIT','IN','HB'),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/1vnql1258139478.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 = -0.2806, p-value = 0.779 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.02485876 > 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/2f5lk1258139479.tab") > > system("convert tmp/1vnql1258139478.ps tmp/1vnql1258139478.png") > > > proc.time() user system elapsed 0.517 0.211 0.806