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(8.9 + ,3.58 + ,98.2 + ,4634 + ,8.6 + ,3.52 + ,98.71 + ,3996 + ,8.3 + ,3.45 + ,98.54 + ,4308 + ,8.3 + ,3.36 + ,98.2 + ,4143 + ,8.3 + ,3.27 + ,96.92 + ,4429 + ,8.4 + ,3.21 + ,99.06 + ,5219 + ,8.5 + ,3.19 + ,99.65 + ,4929 + ,8.4 + ,3.16 + ,99.82 + ,5755 + ,8.6 + ,3.12 + ,99.99 + ,5592 + ,8.5 + ,3.06 + ,100.33 + ,4163 + ,8.5 + ,3.01 + ,99.31 + ,4962 + ,8.4 + ,2.98 + ,101.1 + ,5208 + ,8.5 + ,2.97 + ,101.1 + ,4755 + ,8.5 + ,3.02 + ,100.93 + ,4491 + ,8.5 + ,3.07 + ,100.85 + ,5732 + ,8.5 + ,3.18 + ,100.93 + ,5731 + ,8.5 + ,3.29 + ,99.6 + ,5040 + ,8.5 + ,3.43 + ,101.88 + ,6102 + ,8.5 + ,3.61 + ,101.81 + ,4904 + ,8.5 + ,3.74 + ,102.38 + ,5369 + ,8.6 + ,3.87 + ,102.74 + ,5578 + ,8.4 + ,3.88 + ,102.82 + ,4619 + ,8.1 + ,4.09 + ,101.72 + ,4731 + ,8 + ,4.19 + ,103.47 + ,5011 + ,8 + ,4.2 + ,102.98 + ,5299 + ,8 + ,4.29 + ,102.68 + ,4146 + ,8 + ,4.37 + ,102.9 + ,4625 + ,7.9 + ,4.47 + ,103.03 + ,4736 + ,7.8 + ,4.61 + ,101.29 + ,4219 + ,7.8 + ,4.65 + ,103.69 + ,5116 + ,7.9 + ,4.69 + ,103.68 + ,4205 + ,8.1 + ,4.82 + ,104.2 + ,4121 + ,8 + ,4.86 + ,104.08 + ,5103 + ,7.6 + ,4.87 + ,104.16 + ,4300 + ,7.3 + ,5.01 + ,103.05 + ,4578 + ,7 + ,5.03 + ,104.66 + ,3809 + ,6.8 + ,5.13 + ,104.46 + ,5526 + ,7 + ,5.18 + ,104.95 + ,4247 + ,7.1 + ,5.21 + ,105.85 + ,3830 + ,7.2 + ,5.26 + ,106.23 + ,4394 + ,7.1 + ,5.25 + ,104.86 + ,4826 + ,6.9 + ,5.2 + ,107.44 + ,4409 + ,6.7 + ,5.16 + ,108.23 + ,4569 + ,6.7 + ,5.19 + ,108.45 + ,4106 + ,6.6 + ,5.39 + ,109.39 + ,4794 + ,6.9 + ,5.58 + ,110.15 + ,3914 + ,7.3 + ,5.76 + ,109.13 + ,3793 + ,7.5 + ,5.89 + ,110.28 + ,4405 + ,7.3 + ,5.98 + ,110.17 + ,4022 + ,7.1 + ,6.02 + ,109.99 + ,4100 + ,6.9 + ,5.62 + ,109.26 + ,4788 + ,7.1 + ,4.87 + ,109.11 + ,3163 + ,7.5 + ,4.24 + ,107.06 + ,3585 + ,7.7 + ,4.02 + ,109.53 + ,3903 + ,7.8 + ,3.74 + ,108.92 + ,4178 + ,7.8 + ,3.45 + ,109.24 + ,3863 + ,7.7 + ,3.34 + ,109.12 + ,4187 + ,7.8 + ,3.21 + ,109 + ,NA + ,7.8 + ,3.12 + ,107.23 + ,NA + ,7.9 + ,3.04 + ,109.49 + ,NA) + ,dim=c(4 + ,60) + ,dimnames=list(c('werkl' + ,'rente' + ,'cons' + ,'bverg') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('werkl','rente','cons','bverg'),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/1cjdq1257963693.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.4562, p-value = 1.074e-10 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.5886604 > 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/2qag91257963693.tab") > > system("convert tmp/1cjdq1257963693.ps tmp/1cjdq1257963693.png") > > > proc.time() user system elapsed 0.525 0.215 0.673