R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(48527 + ,102.61 + ,102.86 + ,99.25 + ,44446 + ,102.18 + ,102.12 + ,99.36 + ,46380 + ,101.64 + ,100.74 + ,99.34 + ,48950 + ,102 + ,100.96 + ,99.36 + ,38883 + ,102.18 + ,101.01 + ,100.85 + ,42928 + ,101.89 + ,100.41 + ,100.86 + ,37107 + ,102.09 + ,100.35 + ,100.93 + ,30186 + ,101.6 + ,99.33 + ,101.25 + ,32602 + ,101.33 + ,98.66 + ,101.72 + ,39892 + ,101.44 + ,98.69 + ,101.54 + ,32194 + ,101.49 + ,98.61 + ,101.35 + ,21629 + ,100.41 + ,96.41 + ,101.42 + ,59968 + ,101.38 + ,96.3 + ,101.57 + ,45694 + ,101.4 + ,96.12 + ,101.76 + ,55756 + ,102.16 + ,97.32 + ,102.05 + ,48554 + ,104.46 + ,101.78 + ,102.05 + ,41052 + ,104.75 + ,102.28 + ,101.89 + ,49822 + ,104.2 + ,101.12 + ,102.06 + ,39191 + ,106.05 + ,104.55 + ,102 + ,31994 + ,107.54 + ,107.4 + ,102.14 + ,35735 + ,108.23 + ,108.41 + ,102.2 + ,38930 + ,108.99 + ,109.43 + ,102.3 + ,33658 + ,109.51 + ,110.34 + ,102.7 + ,23849 + ,111.99 + ,115.06 + ,102.77 + ,58972 + ,111.08 + ,113.13 + ,103.1 + ,59249 + ,112.95 + ,116.56 + ,103.13 + ,63955 + ,115.49 + ,121.39 + ,103.31 + ,53785 + ,114.67 + ,119.12 + ,103.52 + ,52760 + ,116.85 + ,123.31 + ,103.34 + ,44795 + ,119.57 + ,128.57 + ,103.53 + ,37348 + ,119.41 + ,127.71 + ,103.8 + ,32370 + ,118.46 + ,125.68 + ,103.9 + ,32717 + ,122.81 + ,133.8 + ,103.91 + ,40974 + ,121.76 + ,130.97 + ,104.21 + ,33591 + ,121.37 + ,129.99 + ,104.58 + ,21124 + ,118.61 + ,124 + ,104.89 + ,58608 + ,116.08 + ,118.63 + ,105.15 + ,46865 + ,117.84 + ,121.86 + ,105.24 + ,51378 + ,117.02 + ,119.97 + ,105.57 + ,46235 + ,119.78 + ,125.03 + ,105.62 + ,47206 + ,122.58 + ,130.09 + ,106.17 + ,45382 + ,120.98 + ,126.65 + ,106.27 + ,41227 + ,118.92 + ,121.7 + ,106.41 + ,33795 + ,117.81 + ,119.24 + ,106.94 + ,31295 + ,119.73 + ,122.63 + ,107.16 + ,42625 + ,117.16 + ,116.66 + ,107.32 + ,33625 + ,116.03 + ,114.12 + ,107.32 + ,21538 + ,115.55 + ,113.11 + ,107.35 + ,56421 + ,115.36 + ,112.61 + ,107.55 + ,53152 + ,116.09 + ,113.4 + ,107.87 + ,53536 + ,117.32 + ,115.18 + ,108.37 + ,52408 + ,120.45 + ,121.01 + ,108.38 + ,41454 + ,119.86 + ,119.44 + ,107.92 + ,38271 + ,118.51 + ,116.68 + ,108.03 + ,35306 + ,118.92 + ,117.07 + ,108.14 + ,26414 + ,119.11 + ,117.41 + ,108.3 + ,31917 + ,120.34 + ,119.58 + ,108.64 + ,38030 + ,121.23 + ,120.92 + ,108.66 + ,27534 + ,119.43 + ,117.09 + ,109.04 + ,18387 + ,119.28 + ,116.77 + ,109.03 + ,50556 + ,120.64 + ,119.39 + ,109.03 + ,43901 + ,122.24 + ,122.49 + ,109.54 + ,48572 + ,123.1 + ,124.08 + ,109.75 + ,43899 + ,120.72 + ,118.29 + ,109.83 + ,37532 + ,118.34 + ,112.94 + ,109.65 + ,40357 + ,118.8 + ,113.79 + ,109.82 + ,35489 + ,119.29 + ,114.43 + ,109.95 + ,29027 + ,121.47 + ,118.7 + ,110.12 + ,34485 + ,122.35 + ,120.36 + ,110.15 + ,42598 + ,121.53 + ,118.27 + ,110.21 + ,30306 + ,121.72 + ,118.34 + ,109.99 + ,26451 + ,121.58 + ,117.82 + ,110.14 + ,47460 + ,121.55 + ,117.65 + ,110.14 + ,50104 + ,122.02 + ,118.18 + ,110.81 + ,61465 + ,123.74 + ,121.02 + ,110.97 + ,53726 + ,125.8 + ,124.78 + ,110.99 + ,39477 + ,129.29 + ,131.16 + ,109.73 + ,43895 + ,128.89 + ,130.14 + ,109.81 + ,31481 + ,130.04 + ,131.75 + ,110.02 + ,29896 + ,131.57 + ,134.73 + ,110.18 + ,33842 + ,131.97 + ,135.35 + ,110.21 + ,39120 + ,134.43 + ,140.32 + ,110.25 + ,33702 + ,132.63 + ,136.35 + ,110.36 + ,25094 + ,130.26 + ,131.6 + ,110.51 + ,51442 + ,129 + ,128.9 + ,110.6 + ,45594 + ,131.65 + ,133.89 + ,110.95 + ,52518 + ,134.21 + ,138.25 + ,111.18 + ,48564 + ,138.63 + ,146.23 + ,111.19 + ,41745 + ,138.1 + ,144.76 + ,111.69 + ,49585 + ,140.51 + ,149.3 + ,111.7 + ,32747 + ,144.36 + ,156.8 + ,111.83 + ,33379 + ,145.57 + ,159.08 + ,111.77 + ,35645 + ,148.7 + ,165.12 + ,111.73 + ,37034 + ,147.86 + ,163.14 + ,112.01 + ,35681 + ,143.16 + ,153.43 + ,111.86 + ,20972 + ,141.96 + ,151.01 + ,112.04) + ,dim=c(4 + ,96) + ,dimnames=list(c('PwTi' + ,'I_tot' + ,'I_bra' + ,'I_ak') + ,1:96)) > y <- array(NA,dim=c(4,96),dimnames=list(c('PwTi','I_tot','I_bra','I_ak'),1:96)) > 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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/1zmby1195986360.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 > 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.2028, p-value = 0.2291 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.08335161 > 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/2xk7n1195986360.tab") > > system("convert tmp/1zmby1195986360.ps tmp/1zmby1195986360.png") > > > proc.time() user system elapsed 0.833 0.269 0.962