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(90.21 + ,95.40 + ,98.83 + ,94.60 + ,93.24 + ,99.31 + ,99.45 + ,85.88 + ,95.60 + ,101.80 + ,97.19 + ,77.43 + ,97.58 + ,100.53 + ,95.19 + ,85.15 + ,100.81 + ,102.28 + ,95.71 + ,88.27 + ,101.65 + ,101.89 + ,96.56 + ,102.76 + ,102.08 + ,98.08 + ,97.38 + ,102.53 + ,100.18 + ,98.98 + ,97.89 + ,99.72 + ,101.36 + ,100.02 + ,103.85 + ,106.46 + ,103.46 + ,100.58 + ,103.78 + ,111.29 + ,106.59 + ,100.67 + ,104.74 + ,123.13 + ,107.24 + ,100.46 + ,109.44 + ,122.77 + ,107.84 + ,98.47 + ,115.01 + ,113.87 + ,110.08 + ,102.01 + ,119.20 + ,108.04 + ,114.34 + ,103.28 + ,126.34 + ,110.54 + ,120.00 + ,103.70 + ,133.03 + ,122.29 + ,124.78 + ,104.64 + ,136.57 + ,118.80 + ,128.21 + ,106.31 + ,136.16 + ,121.30 + ,127.48 + ,107.16 + ,146.40 + ,131.26 + ,124.39 + ,108.10 + ,156.09 + ,138.67 + ,116.83 + ,104.90 + ,138.74 + ,134.28 + ,121.13 + ,105.27 + ,146.81 + ,143.25 + ,126.39 + ,107.37 + ,144.88 + ,143.10 + ,129.92 + ,110.01 + ,138.46 + ,123.67 + ,135.43 + ,114.11 + ,136.78 + ,115.57 + ,137.43 + ,116.22 + ,143.13 + ,114.43 + ,140.42 + ,118.06 + ,140.00 + ,120.32 + ,145.42 + ,119.35 + ,142.50 + ,105.96 + ,147.35 + ,120.48 + ,149.54 + ,112.31 + ,142.58 + ,117.02 + ,145.69 + ,119.20 + ,150.25 + ,121.66 + ,147.92 + ,130.24 + ,153.71 + ,127.88 + ,145.78 + ,130.29 + ,151.23 + ,128.58 + ,143.73 + ,135.34 + ,149.32 + ,130.42 + ,142.64 + ,144.89 + ,137.53 + ,126.28 + ,143.45 + ,137.53 + ,140.60 + ,129.31 + ,150.36 + ,147.00 + ,145.14 + ,132.59 + ,155.79 + ,157.30 + ,134.34 + ,125.91 + ,161.87 + ,178.27 + ,134.72 + ,127.88 + ,162.31 + ,174.42 + ,125.81 + ,119.59 + ,177.40 + ,177.56 + ,121.77 + ,118.46 + ,184.29 + ,181.14 + ,120.24 + ,116.31 + ,183.93 + ,197.89 + ,126.24 + ,120.72 + ,169.99 + ,211.09 + ,124.39 + ,122.21 + ,168.68 + ,238.81 + ,114.68 + ,115.00 + ,168.22 + ,255.45 + ,99.24 + ,107.99 + ,175.42 + ,261.45 + ,99.71 + ,109.98 + ,165.37 + ,223.45 + ,96.94 + ,106.01 + ,169.06 + ,195.25 + ,71.92 + ,87.58 + ,179.68 + ,145.79 + ,65.92 + ,82.17 + ,175.58 + ,106.81 + ,60.96 + ,81.99 + ,179.74 + ,84.32 + ,62.35 + ,80.08 + ,190.53 + ,87.19 + ,59.26 + ,73.35 + ,215.82 + ,84.73 + ,54.65 + ,69.01 + ,209.81 + ,91.41 + ,61.01 + ,76.23 + ,199.53 + ,98.32 + ,67.15 + ,80.10 + ,200.58 + ,111.35 + ,66.42 + ,81.96 + ,199.20 + ,132.91 + ,67.77 + ,82.79 + ,195.59 + ,126.31 + ,75.05 + ,89.42 + ,196.36 + ,140.29 + ,79.95 + ,91.90 + ,201.71 + ,131.70) + ,dim=c(4 + ,60) + ,dimnames=list(c('Bel20' + ,'Dow' + ,'Goud' + ,'Olie ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Bel20','Dow','Goud','Olie '),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/1evdz1257688708.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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 = 8.6361, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7654042 > 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/2ja411257688708.tab") > > system("convert tmp/1evdz1257688708.ps tmp/1evdz1257688708.png") > > > proc.time() user system elapsed 0.704 0.295 0.760