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(85.9 + ,3.25 + ,252.5 + ,2.6 + ,76.8 + ,3.25 + ,251.1 + ,2.5 + ,96.2 + ,3.25 + ,255.1 + ,2.5 + ,83.9 + ,3.25 + ,258.3 + ,1.6 + ,88.7 + ,3.25 + ,255.3 + ,1.4 + ,105.4 + ,3.25 + ,261.1 + ,0.8 + ,86.7 + ,3.25 + ,253.8 + ,1.1 + ,76.3 + ,3.25 + ,252.9 + ,1.3 + ,93.2 + ,3.25 + ,253.9 + ,1.2 + ,105.1 + ,3.25 + ,255.5 + ,1.3 + ,121 + ,3.25 + ,262 + ,1.1 + ,163 + ,2.85 + ,262.8 + ,1.3 + ,94.7 + ,2.75 + ,263.3 + ,1.2 + ,78.4 + ,2.75 + ,262.5 + ,1.6 + ,101.4 + ,2.55 + ,269.2 + ,1.7 + ,91.2 + ,2.5 + ,270.8 + ,1.5 + ,89.9 + ,2.5 + ,274.1 + ,0.9 + ,112.2 + ,2.1 + ,273 + ,1.5 + ,81.5 + ,2 + ,267.3 + ,1.4 + ,78.8 + ,2 + ,267.1 + ,1.6 + ,99.1 + ,2 + ,268.2 + ,1.7 + ,101.3 + ,2 + ,270.2 + ,1.4 + ,91.5 + ,2 + ,271.5 + ,1.8 + ,152.6 + ,2 + ,281 + ,1.7 + ,86.6 + ,2 + ,280.1 + ,1.4 + ,86.6 + ,2 + ,281.5 + ,1.2 + ,98.5 + ,2 + ,285.9 + ,1 + ,86.7 + ,2 + ,289.8 + ,1.7 + ,89.1 + ,2 + ,292.9 + ,2.4 + ,111 + ,2 + ,291.2 + ,2 + ,92.6 + ,2 + ,291.8 + ,2.1 + ,85.1 + ,2 + ,289.8 + ,2 + ,116.1 + ,2 + ,292.5 + ,1.8 + ,98.3 + ,2 + ,290.3 + ,2.7 + ,97.7 + ,2 + ,297.5 + ,2.3 + ,177.9 + ,2 + ,307.5 + ,1.9 + ,94.2 + ,2 + ,304.7 + ,2 + ,83.8 + ,2 + ,304.6 + ,2.3 + ,109.5 + ,2 + ,310.7 + ,2.8 + ,102.3 + ,2 + ,310.7 + ,2.4 + ,102.5 + ,2 + ,315.7 + ,2.3 + ,162.7 + ,2 + ,314.7 + ,2.7 + ,85.3 + ,2 + ,312.2 + ,2.7 + ,88.2 + ,2 + ,312.8 + ,2.9 + ,104.7 + ,2 + ,314.3 + ,3 + ,99.4 + ,2 + ,319.7 + ,2.2 + ,113.8 + ,2 + ,319.9 + ,2.3 + ,166.6 + ,2.21 + ,329.5 + ,2.8 + ,89.2 + ,2.25 + ,326.9 + ,2.8 + ,93.2 + ,2.25 + ,329.7 + ,2.8 + ,115 + ,2.45 + ,335.7 + ,2.2 + ,97.2 + ,2.5 + ,337.2 + ,2.6 + ,112.5 + ,2.5 + ,339.7 + ,2.8 + ,121.8 + ,2.64 + ,338.3 + ,2.5 + ,100.2 + ,2.75 + ,339.2 + ,2.4 + ,93.8 + ,2.93 + ,342.5 + ,2.3 + ,113.6 + ,3 + ,342.2 + ,1.9 + ,110.7 + ,3.17 + ,338.3 + ,1.7 + ,127.6 + ,3.25 + ,339 + ,2 + ,185.9 + ,3.39 + ,345.9 + ,2.1) + ,dim=c(4 + ,60) + ,dimnames=list(c('Inves.' + ,'Rente' + ,'M3' + ,'HICP') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Inves.','Rente','M3','HICP'),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/1fznf1257771562.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 = 0.2727, p-value = 0.785 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.02651452 > 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/2co481257771562.tab") > > system("convert tmp/1fznf1257771562.ps tmp/1fznf1257771562.png") > > > proc.time() user system elapsed 0.497 0.210 0.587