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(127 + ,392 + ,2.75 + ,30.23 + ,123 + ,394 + ,2.75 + ,32.33 + ,118 + ,392 + ,2.55 + ,29.87 + ,114 + ,396 + ,2.5 + ,24.87 + ,108 + ,392 + ,2.5 + ,25.48 + ,111 + ,396 + ,2.1 + ,27.28 + ,151 + ,419 + ,2 + ,28.24 + ,159 + ,421 + ,2 + ,29.58 + ,158 + ,420 + ,2 + ,26.95 + ,148 + ,418 + ,2 + ,29.08 + ,138 + ,410 + ,2 + ,28.76 + ,137 + ,418 + ,2 + ,29.59 + ,136 + ,426 + ,2 + ,30.7 + ,133 + ,428 + ,2 + ,30.52 + ,126 + ,430 + ,2 + ,32.67 + ,120 + ,424 + ,2 + ,33.19 + ,114 + ,423 + ,2 + ,37.13 + ,116 + ,427 + ,2 + ,35.54 + ,153 + ,441 + ,2 + ,37.75 + ,162 + ,449 + ,2 + ,41.84 + ,161 + ,452 + ,2 + ,42.94 + ,149 + ,462 + ,2 + ,49.24 + ,139 + ,455 + ,2 + ,44.61 + ,135 + ,461 + ,2 + ,40.22 + ,130 + ,461 + ,2 + ,44.23 + ,127 + ,463 + ,2 + ,25.85 + ,122 + ,462 + ,2 + ,53.38 + ,117 + ,456 + ,2 + ,53.26 + ,112 + ,455 + ,2 + ,51.8 + ,113 + ,456 + ,2 + ,55.3 + ,149 + ,472 + ,2 + ,57.81 + ,157 + ,472 + ,2 + ,63.96 + ,157 + ,471 + ,2 + ,63.77 + ,147 + ,465 + ,2 + ,59.15 + ,137 + ,459 + ,2 + ,56.12 + ,132 + ,465 + ,2.21 + ,57.42 + ,125 + ,468 + ,2.25 + ,63.52 + ,123 + ,467 + ,2.25 + ,61.71 + ,117 + ,463 + ,2.45 + ,63.01 + ,114 + ,460 + ,2.5 + ,68.18 + ,111 + ,462 + ,2.5 + ,72.03 + ,112 + ,461 + ,2.64 + ,69.75 + ,144 + ,476 + ,2.75 + ,74.41 + ,150 + ,476 + ,2.93 + ,74.33 + ,149 + ,471 + ,3 + ,64.24 + ,134 + ,453 + ,3.17 + ,60.03 + ,123 + ,443 + ,3.25 + ,59.44 + ,116 + ,442 + ,3.39 + ,62.5 + ,117 + ,444 + ,3.5 + ,55.04 + ,111 + ,438 + ,3.5 + ,58.34 + ,105 + ,427 + ,3.65 + ,61.92 + ,102 + ,424 + ,3.75 + ,67.65 + ,95 + ,416 + ,3.75 + ,67.68 + ,93 + ,406 + ,3.9 + ,70.3 + ,124 + ,431 + ,4 + ,75.26 + ,130 + ,434 + ,4 + ,71.44 + ,124 + ,418 + ,4 + ,76.36 + ,115 + ,412 + ,4 + ,81.71 + ,106 + ,404 + ,4 + ,92.6 + ,105 + ,409 + ,4 + ,90.6 + ,105 + ,412 + ,4 + ,92.23 + ,101 + ,406 + ,4 + ,94.09 + ,95 + ,398 + ,4 + ,102.79 + ,93 + ,397 + ,4 + ,109.65 + ,84 + ,385 + ,4 + ,124.05 + ,87 + ,390 + ,4 + ,132.69 + ,116 + ,413 + ,4.18 + ,135.81 + ,120 + ,413 + ,4.25 + ,116.07 + ,117 + ,401 + ,4.25 + ,101.42 + ,109 + ,397 + ,3.97 + ,75.73 + ,105 + ,397 + ,3.42 + ,55.48 + ,107 + ,409 + ,2.75 + ,43.8) + ,dim=c(4 + ,72) + ,dimnames=list(c('Werkloosheid' + ,'Werkloosheid' + ,'Rente' + ,'Brent ') + ,1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('Werkloosheid','Werkloosheid','Rente','Brent '),1:72)) > 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/16z8c1258036637.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] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 4.744, p-value = 2.095e-06 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3863685 > 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/2ex151258036637.tab") > > system("convert tmp/16z8c1258036637.ps tmp/16z8c1258036637.png") > > > proc.time() user system elapsed 0.500 0.225 1.163