R version 2.7.0 (2008-04-22) 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(493 + ,13.5 + ,4.7 + ,9 + ,-0.6 + ,481 + ,16.2 + ,3.6 + ,11 + ,1.1 + ,462 + ,17.6 + ,8.2 + ,13 + ,1.4 + ,457 + ,15.8 + ,6.3 + ,12 + ,1.4 + ,442 + ,17.6 + ,3.7 + ,13 + ,1.3 + ,439 + ,15.2 + ,8.9 + ,15 + ,1.4 + ,488 + ,15.9 + ,1.1 + ,13 + ,-0.1 + ,521 + ,12 + ,1.9 + ,16 + ,1.8 + ,501 + ,13.3 + ,5 + ,10 + ,1.5 + ,485 + ,14.8 + ,1.5 + ,14 + ,1.5 + ,464 + ,16.1 + ,1.6 + ,14 + ,1.4 + ,460 + ,16.9 + ,3.8 + ,15 + ,1.6 + ,467 + ,17.6 + ,0.2 + ,13 + ,1.6 + ,460 + ,13.9 + ,1.2 + ,8 + ,1.6 + ,448 + ,10 + ,-3.8 + ,7 + ,1.4 + ,443 + ,7.6 + ,-9.2 + ,3 + ,1.7 + ,436 + ,7.1 + ,-11.6 + ,3 + ,1.8 + ,431 + ,8.1 + ,-9.5 + ,4 + ,1.9 + ,484 + ,8.1 + ,-11 + ,4 + ,2.2 + ,510 + ,7.7 + ,-10.8 + ,0 + ,2.1 + ,513 + ,4 + ,-12.1 + ,-4 + ,2.4 + ,503 + ,1.4 + ,-17 + ,-14 + ,2.6 + ,471 + ,0.3 + ,-14.6 + ,-18 + ,2.8 + ,471 + ,-1 + ,-15.1 + ,-8 + ,2.7 + ,476 + ,-1.9 + ,-12.8 + ,-1 + ,2.6 + ,475 + ,-1.5 + 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6.3 + ,5.5 + ,1 + ,1.7 + ,555 + ,8 + ,4.2 + ,-1 + ,1.8 + ,565 + ,7.6 + ,3.3 + ,-2 + ,1.9 + ,542 + ,7 + ,1.5 + ,-2 + ,1.7 + ,527 + ,6.9 + ,-0.1 + ,-1 + ,2 + ,510 + ,6.8 + ,1.4 + ,-8 + ,2.1 + ,514 + ,7.5 + ,-1.9 + ,-4 + ,2.4 + ,517 + ,6.4 + ,-0.8 + ,-6 + ,2.5 + ,508 + ,8 + ,0.2 + ,-3 + ,2.5 + ,493 + ,6.4 + ,1.2 + ,-3 + ,2.6 + ,490 + ,9.6 + ,-7.9 + ,-7 + ,2.2 + ,469 + ,7.5 + ,-1.6 + ,-9 + ,2.5 + ,478 + ,9 + ,-5.9 + ,-11 + ,2.8 + ,528 + ,7.9 + ,-7.6 + ,-13 + ,2.8 + ,534 + ,8.1 + ,-5.9 + ,-11 + ,2.9 + ,518 + ,9.1 + ,-14.4 + ,-9 + ,3 + ,506 + ,4.3 + ,-14.8 + ,-17 + ,3.1) + ,dim=c(5 + ,106) + ,dimnames=list(c('werk' + ,'econ' + ,'conj' + ,'cons' + ,'infl ') + ,1:106)) > y <- array(NA,dim=c(5,106),dimnames=list(c('werk','econ','conj','cons','infl '),1:106)) > 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/1s1301229936057.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/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] 5 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 1.2698, p-value = 0.2042 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.08404126 > 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/2is2m1229936058.tab") > > system("convert tmp/1s1301229936057.ps tmp/1s1301229936057.png") > > > proc.time() user system elapsed 1.647 0.436 1.701