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(100 + ,100 + ,100 + ,100 + ,98.78 + ,99.88 + ,101.71 + ,99.74 + ,96.87 + ,98.97 + ,102.79 + ,98.76 + ,94.36 + ,96.73 + ,102.21 + ,96.67 + ,92.60 + ,95.72 + ,101.62 + ,95.44 + ,94.19 + ,96.37 + ,102.72 + ,96.51 + ,111.67 + ,101.42 + ,102.64 + ,105.55 + ,120.38 + ,102.11 + ,98.75 + ,108.61 + ,112.53 + ,105.44 + ,110.46 + ,108.94 + ,113.05 + ,105.21 + ,108.37 + ,108.71 + ,108.02 + ,103.32 + ,106.77 + ,105.66 + ,109.70 + ,102.70 + ,105.92 + ,105.89 + ,108.79 + ,101.92 + ,105.23 + ,105.08 + ,106.53 + ,102.24 + ,108.18 + ,104.81 + ,105.06 + ,101.71 + ,107.72 + ,103.93 + ,102.52 + ,100.01 + ,106.09 + ,101.92 + ,100.42 + ,99.37 + ,106.71 + ,100.91 + ,101.49 + ,99.43 + ,105.70 + ,101.19 + ,118.60 + ,104.84 + ,106.51 + ,110.39 + ,122.94 + ,106.00 + ,101.63 + ,111.84 + ,114.98 + ,108.62 + ,112.86 + ,111.72 + ,111.51 + ,105.30 + ,112.85 + ,108.85 + ,106.02 + ,104.15 + ,110.70 + ,105.88 + ,107.20 + ,103.58 + ,111.45 + ,106.19 + ,101.41 + ,106.75 + ,112.12 + ,105.53 + ,101.42 + ,105.13 + ,113.06 + ,104.93 + ,98.32 + ,103.69 + ,113.25 + ,103.11 + ,99.32 + ,101.72 + ,110.21 + ,102.11 + ,97.65 + ,101.80 + ,112.49 + ,101.86 + ,97.79 + ,102.68 + ,109.70 + ,101.89 + ,111.01 + ,108.77 + ,112.29 + ,110.18 + ,111.28 + ,110.99 + ,112.20 + ,111.29 + ,106.63 + ,111.76 + ,114.67 + ,110.24 + ,96.56 + ,108.60 + ,112.00 + ,104.50 + ,91.53 + ,105.76 + ,107.82 + ,100.61 + ,89.99 + ,103.89 + ,107.49 + ,99.10 + ,89.99 + ,105.28 + ,107.16 + ,99.69 + ,85.87 + ,104.37 + ,106.60 + ,97.60 + ,82.37 + ,100.57 + ,106.87 + ,94.55 + ,79.82 + ,101.27 + ,104.51 + ,93.53 + ,77.37 + ,97.62 + ,104.36 + ,90.88 + ,77.72 + ,92.16 + ,105.53 + ,88.68 + ,93.56 + ,99.80 + ,108.60 + ,98.76 + ,93.60 + ,103.00 + ,109.59 + ,100.40 + ,84.41 + ,101.67 + ,110.02 + ,96.32 + ,80.23 + ,99.65 + ,109.64 + ,93.73 + ,76.97 + ,96.09 + ,108.54 + ,90.67 + ,79.22 + ,95.88 + ,108.66 + ,91.45 + ,78.48 + ,97.84 + ,107.71 + ,91.93 + ,75.93 + ,97.25 + ,105.05 + ,90.26 + ,74.88 + ,92.48 + ,104.69 + ,87.60 + ,73.81 + ,92.57 + ,104.35 + ,87.18 + ,69.83 + ,88.35 + ,102.79 + ,83.47 + ,73.12 + ,88.63 + ,103.23 + ,84.93 + ,86.26 + ,96.54 + ,105.42 + ,93.96 + ,86.51 + ,98.09 + ,106.17 + ,94.89 + ,80.62 + ,96.99 + ,106.09 + ,92.11 + ,78.32 + ,93.81 + ,107.74 + ,90.01 + ,77.15 + ,93.25 + ,107.38 + ,89.25 + ,82.34 + ,94.22 + ,108.02 + ,91.79 + ,86.21 + ,95.21 + ,109.34 + ,93.94 + ,87.51 + ,95.51 + ,110.28 + ,94.72) + ,dim=c(4 + ,62) + ,dimnames=list(c('VL' + ,'WAL' + ,'BRU' + ,'BEL') + ,1:62)) > y <- array(NA,dim=c(4,62),dimnames=list(c('VL','WAL','BRU','BEL'),1:62)) > 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/1fwrx1258210421.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.4265, p-value = 1.306e-10 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5596403 > 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/2jso51258210421.tab") > > system("convert tmp/1fwrx1258210421.ps tmp/1fwrx1258210421.png") > > > proc.time() user system elapsed 0.518 0.216 0.667