R version 2.8.0 (2008-10-20) 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(117.1 + ,95.1 + ,8.9 + ,269285 + ,118.7 + ,97 + ,8.8 + ,269829 + ,126.5 + ,112.7 + ,8.3 + ,270911 + ,127.5 + ,102.9 + ,7.5 + ,266844 + ,134.6 + ,97.4 + ,7.2 + ,271244 + ,131.8 + ,111.4 + ,7.4 + ,269907 + ,135.9 + ,87.4 + ,8.8 + ,271296 + ,142.7 + ,96.8 + ,9.3 + ,270157 + ,141.7 + ,114.1 + ,9.3 + ,271322 + ,153.4 + ,110.3 + ,8.7 + ,267179 + ,145 + ,103.9 + ,8.2 + ,264101 + ,137.7 + ,101.6 + ,8.3 + ,265518 + ,148.3 + ,94.6 + ,8.5 + ,269419 + ,152.2 + ,95.9 + ,8.6 + ,268714 + ,169.4 + ,104.7 + ,8.5 + ,272482 + ,168.6 + ,102.8 + ,8.2 + ,268351 + ,161.1 + ,98.1 + ,8.1 + ,268175 + ,174.1 + ,113.9 + ,7.9 + ,270674 + ,179 + ,80.9 + ,8.6 + ,272764 + ,190.6 + ,95.7 + ,8.7 + ,272599 + ,190 + ,113.2 + ,8.7 + ,270333 + ,181.6 + ,105.9 + ,8.5 + ,270846 + ,174.8 + ,108.8 + ,8.4 + ,270491 + ,180.5 + ,102.3 + ,8.5 + ,269160 + ,196.8 + ,99 + ,8.7 + ,274027 + ,193.8 + ,100.7 + ,8.7 + ,273784 + ,197 + ,115.5 + ,8.6 + ,276663 + ,216.3 + ,100.7 + ,8.5 + ,274525 + ,221.4 + ,109.9 + ,8.3 + ,271344 + ,217.9 + ,114.6 + ,8 + ,271115 + ,229.7 + ,85.4 + ,8.2 + ,270798 + ,227.4 + ,100.5 + ,8.1 + ,273911 + ,204.2 + ,114.8 + ,8.1 + ,273985 + ,196.6 + ,116.5 + ,8 + ,271917 + ,198.8 + ,112.9 + ,7.9 + ,273338 + ,207.5 + ,102 + ,7.9 + ,270601 + ,190.7 + ,106 + ,8 + ,273547 + ,201.6 + ,105.3 + ,8 + ,275363 + ,210.5 + ,118.8 + ,7.9 + ,281229 + ,223.5 + ,106.1 + ,8 + ,277793 + ,223.8 + ,109.3 + ,7.7 + ,279913 + ,231.2 + ,117.2 + ,7.2 + ,282500 + ,244 + ,92.5 + ,7.5 + ,280041 + ,234.7 + ,104.2 + ,7.3 + ,282166 + ,250.2 + ,112.5 + ,7 + ,290304 + ,265.7 + ,122.4 + ,7 + ,283519 + ,287.6 + ,113.3 + ,7 + ,287816 + ,283.3 + ,100 + ,7.2 + ,285226 + ,295.4 + ,110.7 + ,7.3 + ,287595 + ,312.3 + ,112.8 + ,7.1 + ,289741 + ,333.8 + ,109.8 + ,6.8 + ,289148 + ,347.7 + ,117.3 + ,6.4 + ,288301 + ,383.2 + ,109.1 + ,6.1 + ,290155 + ,407.1 + ,115.9 + ,6.5 + ,289648 + ,413.6 + ,96 + ,7.7 + ,288225 + ,362.7 + ,99.8 + ,7.9 + ,289351 + ,321.9 + ,116.8 + ,7.5 + ,294735 + ,239.4 + ,115.7 + ,6.9 + ,305333 + ,191 + ,99.4 + ,6.6 + ,309030 + ,159.7 + ,94.3 + ,6.9 + ,310215 + ,163.4 + ,91 + ,7.7 + ,321935) + ,dim=c(4 + ,61) + ,dimnames=list(c('Prijsindexgrondst' + ,'Tot.indus.prod' + ,'werkloosheidsgraad' + ,'Brutoschuld') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('Prijsindexgrondst','Tot.indus.prod','werkloosheidsgraad','Brutoschuld'),1:61)) > 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/freestat/rcomp/tmp/1ypa51257801534.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 2.8688, p-value = 0.00412 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2519814 > 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/freestat/rcomp/tmp/26a741257801534.tab") > > system("convert tmp/1ypa51257801534.ps tmp/1ypa51257801534.png") > > > proc.time() user system elapsed 0.700 0.289 0.753