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 + ,101.12 + ,84.21 + ,97.42 + ,99.93 + ,101.12 + ,89.47 + ,100.61 + ,100.89 + ,101.12 + ,105.26 + ,102.86 + ,101.61 + ,101.12 + ,131.58 + ,97.41 + ,107.26 + ,101.12 + ,126.32 + ,98.23 + ,109.16 + ,101.12 + ,121.05 + ,98.68 + ,106.62 + ,101.12 + ,121.05 + ,100.04 + ,103.56 + ,101.12 + ,110.53 + ,100.79 + ,102.64 + ,101.12 + ,126.32 + ,102.22 + ,104.71 + ,101.12 + ,115.79 + ,102.86 + ,105.95 + ,102.25 + ,126.32 + ,100.52 + ,107.59 + ,101.12 + ,100.00 + ,98.46 + ,107.72 + ,101.12 + ,110.53 + ,98.99 + ,108.29 + ,102.25 + ,110.53 + ,99.87 + ,107.38 + ,101.12 + ,110.53 + ,100.72 + ,109.85 + ,101.12 + ,105.26 + ,101.25 + ,114.94 + ,101.12 + ,110.53 + ,107.41 + ,118.38 + ,101.12 + ,115.79 + ,107.34 + ,117.76 + ,100.00 + ,115.79 + ,108.33 + ,115.87 + ,100.00 + ,136.84 + ,113.19 + ,114.03 + ,100.00 + ,131.58 + ,118.96 + ,114.36 + ,100.00 + ,121.05 + ,123.28 + ,125.35 + ,98.88 + ,115.79 + ,130.67 + ,125.35 + ,98.88 + ,126.32 + ,137.60 + ,122.21 + ,97.75 + ,121.05 + ,141.26 + ,122.16 + ,97.75 + ,115.79 + ,140.83 + ,119.34 + ,95.51 + ,131.58 + ,151.42 + ,122.70 + ,95.51 + ,131.58 + ,161.44 + ,128.63 + ,94.38 + ,131.58 + ,143.50 + ,132.16 + ,92.13 + ,126.32 + ,151.84 + ,127.14 + ,92.13 + ,121.05 + ,149.85 + ,125.11 + ,91.01 + ,89.47 + ,143.21 + ,123.70 + ,91.01 + ,84.21 + ,141.48 + ,121.88 + ,89.89 + ,100.00 + ,148.04 + ,123.10 + ,88.76 + ,100.00 + ,144.80 + ,122.37 + ,87.64 + ,94.74 + ,147.39 + ,122.52 + ,86.52 + ,94.74 + ,154.66 + ,124.67 + ,85.39 + ,100.00 + ,150.69 + ,127.33 + ,84.27 + ,100.00 + ,152.99 + ,129.43 + ,84.27 + ,100.00 + ,150.78 + ,133.76 + ,84.27 + ,100.00 + ,148.66 + ,135.29 + ,84.27 + ,94.74 + ,147.53 + ,126.37 + ,84.27 + ,89.47 + ,148.37 + ,121.33 + ,83.15 + ,110.53 + ,155.52 + ,121.32 + ,83.15 + ,136.84 + ,161.14 + ,113.43 + ,82.02 + ,163.16 + ,167.42 + ,120.76 + ,82.02 + ,163.16 + ,167.88 + ,118.63 + ,82.02 + ,168.42 + ,183.48 + ,122.22 + ,80.90 + ,173.68 + ,190.61 + ,121.04 + ,80.90 + ,189.47 + ,190.24 + ,122.52 + ,82.02 + ,173.68 + ,175.82 + ,123.02 + ,83.15 + ,194.74 + ,174.47 + ,128.80 + ,83.15 + ,210.53 + ,173.99 + ,126.41 + ,84.27 + ,210.53 + ,181.44 + ,119.65 + ,85.39 + ,200.00 + ,171.04 + ,117.56 + ,86.52 + ,189.47 + ,174.86 + ,119.35 + ,88.76 + ,168.42 + ,185.85 + ,116.78 + ,89.89 + ,110.53 + ,181.60 + ,120.19 + ,92.13 + ,84.21 + ,185.90 + ,114.26) + ,dim=c(4 + ,60) + ,dimnames=list(c('werkl' + ,'infl' + ,'goud' + ,'deposito') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('werkl','infl','goud','deposito'),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/1d4t21258121193.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 = -2.1118, p-value = 0.03471 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1997333 > 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/25bfd1258121193.tab") > > system("convert tmp/1d4t21258121193.ps tmp/1d4t21258121193.png") > > > proc.time() user system elapsed 0.495 0.195 0.568