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(5.22 + ,5.35 + ,5.74 + ,1.81 + ,5.09 + ,5.3 + ,5.72 + ,1.59 + ,4.77 + ,5.05 + ,5.24 + ,1.65 + ,4.54 + ,4.94 + ,5.16 + ,1.47 + ,4.56 + ,4.94 + ,5.1 + ,1.3 + ,4.39 + ,4.84 + ,4.89 + ,1.27 + ,4.73 + ,5 + ,5.14 + ,1.33 + ,4.44 + ,5.2 + ,5.39 + ,1.24 + ,4.3 + ,5.14 + ,5.29 + ,1.21 + ,4.24 + ,5.16 + ,5.24 + ,1.33 + ,4.01 + ,4.96 + ,4.97 + ,1.38 + ,3.5 + ,4.97 + ,4.73 + ,1.42 + ,3.23 + ,4.76 + ,4.57 + ,1.3 + ,3.28 + ,4.61 + ,4.65 + ,1.36 + ,3.49 + ,4.85 + ,5.09 + ,1.37 + ,3.7 + ,4.94 + ,5.04 + ,1.48 + ,3.63 + ,5 + ,4.91 + ,1.53 + ,3.95 + ,5.24 + ,5.28 + ,1.39 + ,3.73 + ,5.24 + ,5.21 + ,1.37 + ,3.87 + ,5.25 + ,5.16 + ,1.39 + ,3.66 + ,5.11 + ,4.93 + ,1.32 + ,3.49 + ,4.96 + ,4.65 + ,1.32 + ,3.4 + ,4.68 + ,4.26 + ,1.18 + ,3.32 + ,4.49 + ,3.87 + ,1.18 + ,3.11 + ,4.58 + ,3.94 + ,0.99 + ,3.06 + ,4.58 + ,4.05 + ,1 + ,2.68 + ,4.41 + ,4.03 + ,0.9 + ,2.55 + ,4.23 + ,4.05 + ,0.76 + ,2.34 + ,4.01 + ,3.9 + ,0.78 + ,2.34 + ,4.09 + ,3.81 + ,0.73 + ,2.39 + ,4.23 + ,3.96 + ,0.61 + ,2.21 + ,3.91 + ,3.57 + ,0.52 + ,2.09 + ,3.7 + ,3.33 + ,0.82 + ,2.14 + ,4 + ,3.97 + ,0.95 + ,2.31 + ,4.16 + ,4.44 + ,1.52 + ,2.14 + ,4.23 + ,4.27 + ,1.46 + ,2.45 + ,4.29 + ,4.29 + ,1.48 + ,2.52 + ,4.41 + ,4.3 + ,1.32 + ,2.3 + ,4.34 + ,4.27 + ,1.39 + ,2.25 + ,4.2 + ,4.15 + ,1.33 + ,2.06 + ,4.15 + ,4.08 + ,1.24 + ,1.99 + ,3.99 + ,3.83 + ,1.45 + ,2.25 + ,4.19 + ,4.35 + ,1.55 + ,2.26 + ,4.33 + ,4.72 + ,1.51 + ,2.36 + ,4.39 + ,4.73 + ,1.76 + ,2.3 + ,4.28 + ,4.5 + ,1.85 + ,2.19 + ,4.12 + ,4.28 + ,1.56 + ,2.31 + ,4.09 + ,4.13 + ,1.45 + ,2.21 + ,3.97 + ,4.1 + ,1.49 + ,2.21 + ,3.85 + ,4.19 + ,1.45 + ,2.26 + ,3.64 + ,4.23 + ,1.44 + ,2.18 + ,3.58 + ,4.22 + ,1.28 + ,2.21 + ,3.59 + ,4.17 + ,1.46 + ,2.33 + ,3.76 + ,4.5 + ,1.3 + ,2.12 + ,3.55 + ,4.34 + ,1.25 + ,2.08 + ,3.37 + ,4.14 + ,1.25 + ,1.97 + ,3.2 + ,4 + ,1.18 + ,2.09 + ,3.26 + ,4.18 + ,1.31 + ,2.11 + ,3.3 + ,4.26 + ,1.35 + ,2.24 + ,3.13 + ,4.2 + ,1.49 + ,2.45 + ,3.29 + ,4.46 + ,1.56 + ,2.68 + ,3.49 + ,4.53 + ,1.44 + ,2.73 + ,3.38 + ,4.47 + ,1.48 + ,2.76 + ,3.34 + ,4.42 + ,1.57 + ,2.83 + ,3.5 + ,4.57 + ,1.59 + ,3.16 + ,3.68 + ,4.72 + ,1.77 + ,3.22 + ,3.94 + ,4.99 + ,1.92 + ,3.22 + ,4.01 + ,5.11 + ,1.83 + ,3.34 + ,4.01 + ,5.11 + ,1.92 + ,3.35 + ,4.03 + ,5.09 + ,1.92 + ,3.42 + ,3.9 + ,4.88 + ,1.61 + ,3.58 + ,3.77 + ,4.72 + ,1.67 + ,3.71 + ,3.81 + ,4.73 + ,1.71 + ,3.68 + ,3.74 + ,4.6 + ,1.65 + ,3.83 + ,3.8 + ,4.56 + ,1.68 + ,3.94 + ,4.06 + ,4.76 + ,1.7 + ,3.88 + ,4.1 + ,4.72 + ,1.63 + ,4.03 + ,3.99 + ,4.56 + ,1.65 + ,4.15 + ,4.2 + ,4.7 + ,1.62 + ,4.32 + ,4.33 + ,4.75 + ,1.75 + ,4.4 + ,4.61 + ,5.1 + ,1.86 + ,4.37 + ,4.59 + ,5 + ,1.81 + ,4.14 + ,4.39 + ,4.67 + ,1.6 + ,4.11 + ,4.35 + ,4.52 + ,1.65 + ,4.16 + ,4.4 + ,4.53 + ,1.6) + ,dim=c(4 + ,85) + ,dimnames=list(c('Bel' + ,'Fra' + ,'Usa' + ,'Jap') + ,1:85)) > y <- array(NA,dim=c(4,85),dimnames=list(c('Bel','Fra','Usa','Jap'),1:85)) > 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/1r0v91196334878.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 = 6.5872, p-value = 4.483e-11 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.488526 > 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/2doln1196334878.tab") > > system("convert tmp/1r0v91196334878.ps tmp/1r0v91196334878.png") > > > proc.time() user system elapsed 0.780 0.219 0.855