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(65.4 + ,97.4 + ,104.2 + ,72.2 + ,97 + ,103.2 + ,80.4 + ,105.4 + ,112.7 + ,77.7 + ,102.7 + ,106.4 + ,76.5 + ,98.1 + ,102.6 + ,100.1 + ,104.5 + ,110.6 + ,73.5 + ,87.4 + ,95.2 + ,77.3 + ,89.9 + ,89 + ,98.6 + ,109.8 + ,112.5 + ,112.4 + ,111.7 + ,116.8 + ,77.3 + ,98.6 + ,107.2 + ,139.3 + ,96.9 + ,113.6 + ,75.4 + ,95.1 + ,101.8 + ,64.2 + ,97 + ,102.6 + ,86.8 + ,112.7 + ,122.7 + ,79.1 + ,102.9 + ,110.3 + ,71.7 + ,97.4 + ,110.5 + ,100 + ,111.4 + ,121.6 + ,82.1 + ,87.4 + ,100.3 + ,74.8 + ,96.8 + ,100.7 + ,92.3 + ,114.1 + ,123.4 + ,83.3 + ,110.3 + ,127.1 + ,83.7 + ,103.9 + ,124.1 + ,148 + ,101.6 + ,131.2 + ,71.4 + ,94.6 + ,111.6 + ,71.2 + ,95.9 + ,114.2 + ,84.6 + ,104.7 + ,130.1 + ,80.9 + ,102.8 + ,125.9 + ,80.6 + ,98.1 + ,119 + ,105.5 + ,113.9 + ,133.8 + ,79.2 + ,80.9 + ,107.5 + ,78.4 + ,95.7 + ,113.5 + ,92.6 + ,113.2 + ,134.4 + ,88.3 + ,105.9 + ,126.8 + ,98.2 + ,108.8 + ,135.6 + ,157.4 + ,102.3 + ,139.9 + ,73.9 + ,99 + ,129.8 + ,80.9 + ,100.7 + ,131 + ,93 + ,115.5 + ,153.1 + ,84.9 + ,100.7 + ,134.1 + ,96.2 + ,109.9 + ,144.1 + ,106.5 + ,114.6 + ,155.9 + ,81.7 + ,85.4 + ,123.3 + ,82.9 + ,100.5 + ,128.1 + ,96 + ,114.8 + ,144.3 + ,92.6 + ,116.5 + ,153 + ,116.5 + ,112.9 + ,149.9 + ,155 + ,102 + ,150.9 + ,95.1 + ,106 + ,141 + ,86.2 + ,105.3 + ,138.9 + ,105 + ,118.8 + ,157.4 + ,89.7 + ,106.1 + ,142.9 + ,97.1 + ,109.3 + ,151.7 + ,120.8 + ,117.2 + ,161 + ,92.2 + ,92.5 + ,138.5 + ,98.8 + ,104.2 + ,135.9 + ,104.1 + ,112.5 + ,151.5 + ,106.5 + ,122.4 + ,164 + ,113.4 + ,113.3 + ,159.1 + ,192.4 + ,100 + ,157 + ,103.6 + ,110.7 + ,142.1 + ,97.6 + ,112.8 + ,144.8 + ,99.9 + ,109.8 + ,152.1 + ,106.4 + ,117.3 + ,154.9 + ,104.8 + ,109.1 + ,148.4 + ,114.1 + ,115.9 + ,157.3 + ,93 + ,96 + ,145.7 + ,90.2 + ,99.8 + ,133.8 + ,108.8 + ,116.8 + ,156.8 + ,108.7 + ,115.7 + ,159.4 + ,125.2 + ,99.4 + ,138.3 + ,180.4 + ,94.3 + ,142.7 + ,91.6 + ,91 + ,124.1 + ,87.1 + ,93.2 + ,118.2 + ,98.3 + ,103.1 + ,136.3) + ,dim=c(3 + ,75) + ,dimnames=list(c('Investeringen' + ,'Productie' + ,'Omzet') + ,1:75)) > y <- array(NA,dim=c(3,75),dimnames=list(c('Investeringen','Productie','Omzet'),1:75)) > 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/1qwtt1261057046.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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 5.1787, p-value = 2.234e-07 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4087380 > 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/2asux1261057046.tab") > > try(system("convert tmp/1qwtt1261057046.ps tmp/1qwtt1261057046.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.451 0.192 0.515