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(56.6 + ,124.00 + ,103.5 + ,115.8 + ,56.0 + ,116.00 + ,104.1 + ,112.2 + ,54.8 + ,109.33 + ,101.9 + ,115.8 + ,52.7 + ,110.67 + ,102.00 + ,120.7 + ,50.9 + ,113.33 + ,100.7 + ,118.4 + ,50.6 + ,114.67 + ,99.00 + ,113.1 + ,52.1 + ,113.33 + ,96.5 + ,116.1 + ,53.3 + ,109.33 + ,101.8 + ,114.4 + ,53.9 + ,108.00 + ,100.5 + ,115.6 + ,54.3 + ,105.33 + ,103.3 + ,113.6 + ,54.2 + ,114.67 + ,102.3 + ,109.2 + ,54.2 + ,116.00 + ,100.4 + ,114.2 + ,53.5 + ,116.00 + ,103.00 + ,115.0 + ,51.4 + ,113.33 + ,99.00 + ,110.1 + ,50.5 + ,112.00 + ,104.8 + ,114.1 + ,50.3 + ,113.33 + ,104.5 + ,111.8 + ,49.8 + ,116.00 + ,104.8 + ,118.5 + ,50.7 + ,116.00 + ,103.8 + ,120.3 + ,52.8 + ,114.67 + ,106.3 + ,120.6 + ,55.3 + ,113.33 + ,105.2 + ,116.9 + ,57.3 + ,110.67 + ,108.2 + ,122.4 + ,57.5 + ,106.67 + ,106.2 + ,118.2 + ,56.8 + ,109.33 + ,103.9 + ,114.2 + ,56.4 + ,108.00 + ,104.9 + ,119.5 + ,56.3 + ,108.00 + ,106.2 + ,117.6 + ,56.4 + ,106.67 + ,107.9 + ,120.3 + ,57.0 + ,105.33 + ,106.9 + ,120.8 + ,57.9 + ,105.33 + ,110.3 + ,117.0 + ,58.9 + ,106.67 + ,109.8 + ,121.4 + ,58.8 + ,106.67 + ,108.3 + ,121.0 + ,56.5 + ,105.33 + ,110.9 + ,120.7 + ,51.9 + ,106.67 + ,109.8 + ,118.2 + ,47.4 + ,102.67 + ,109.3 + ,121.2 + ,44.9 + ,96.00 + ,109.00 + ,121.6 + ,43.9 + ,100.00 + ,107.9 + ,122.6 + ,43.4 + ,97.33 + ,108.4 + ,122.9 + ,42.9 + ,93.33 + ,107.2 + ,111.2 + ,42.6 + ,93.33 + ,109.5 + ,121.7 + ,42.2 + ,93.33 + ,109.9 + ,122.1 + ,41.2 + ,96.00 + ,108.00 + ,117.8 + ,40.2 + ,97.33 + ,114.7 + ,123.8 + ,39.3 + ,94.67 + ,115.6 + ,123.5 + ,38.5 + ,90.67 + ,107.6 + ,119.1 + ,38.3 + ,85.33 + ,115.9 + ,125.5 + ,37.9 + ,81.33 + ,111.8 + ,118.9 + ,37.6 + ,86.67 + ,110.00 + ,119.3 + ,37.3 + ,102.67 + ,109.2 + ,123.0 + ,36.0 + ,105.33 + ,108.0 + ,115.2 + ,34.5 + ,100.00 + ,105.6 + ,119.2 + ,33.5 + ,92.00 + ,103.00 + ,118.4 + ,32.9 + ,88.00 + ,99.6 + ,113.7 + ,32.9 + ,92.00 + ,97.9 + ,119.7 + ,32.8 + ,102.67 + ,97.6 + ,114.5 + ,31.9 + ,106.67 + ,96.2 + ,113.0 + ,30.5 + ,106.67 + ,97.9 + ,115.2 + ,29.2 + ,102.67 + ,94.5 + ,113.5 + ,28.7 + ,97.33 + ,95.4 + ,112.9 + ,28.4 + ,98.67 + ,94.4 + ,113.4 + ,28.0 + ,108.00 + ,96.3 + ,112.2 + ,27.4 + ,110.67 + ,95.1 + ,113.1) + ,dim=c(4 + ,60) + ,dimnames=list(c('bont' + ,'werkloosheids' + ,'industr_productie' + ,'consumptiegoederen ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('bont','werkloosheids','industr_productie','consumptiegoederen '),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/18oxw1258813498.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 = 3.4664, p-value = 0.0005274 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3137373 > 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/2ko4z1258813498.tab") > > system("convert tmp/18oxw1258813498.ps tmp/18oxw1258813498.png") > > > proc.time() user system elapsed 0.493 0.218 0.591