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(2.155 + ,22.782 + ,17 + ,12.7 + ,2.172 + ,19.169 + ,14 + ,12.3 + ,2.15 + ,13.807 + ,15 + ,11.9 + ,2.533 + ,29.743 + ,16 + ,12 + ,2.058 + ,25.591 + ,16 + ,12.3 + ,2.16 + ,29.096 + ,15 + ,12.8 + ,2.26 + ,26.482 + ,13 + ,12.4 + ,2.498 + ,22.405 + ,12 + ,12.3 + ,2.695 + ,27.044 + ,13 + ,12.7 + ,2.799 + ,17.97 + ,13 + ,12.7 + ,2.947 + ,18.73 + ,12 + ,12.9 + ,2.93 + ,19.684 + ,10 + ,13 + ,2.318 + ,19.785 + ,14 + ,12.2 + ,2.54 + ,18.479 + ,14 + ,12.3 + ,2.57 + ,10.698 + ,15 + ,12.8 + ,2.669 + ,31.956 + ,16 + ,12.8 + ,2.45 + ,29.506 + ,16 + ,12.8 + ,2.842 + ,34.506 + ,15 + ,12.2 + ,3.44 + ,27.165 + ,15 + ,12.6 + ,2.678 + ,26.736 + ,13 + ,12.8 + ,2.981 + ,23.691 + ,15 + ,12.5 + ,2.26 + ,18.157 + ,15 + ,12.4 + ,2.844 + ,17.328 + ,15 + ,12.3 + ,2.546 + ,18.205 + ,13 + ,11.9 + ,2.456 + ,20.995 + ,16 + ,11.7 + ,2.295 + ,17.382 + ,16 + ,12 + ,2.379 + ,9.367 + ,14 + ,12.1 + ,2.479 + ,31.124 + ,16 + ,11.7 + ,2.057 + ,26.551 + ,15 + ,11.8 + ,2.28 + ,30.651 + ,14 + ,11.8 + ,2.351 + ,25.859 + ,15 + ,11.8 + ,2.276 + ,25.1 + ,15 + ,11.3 + ,2.548 + ,25.778 + ,14 + ,11.3 + ,2.311 + ,20.418 + ,13 + ,11.3 + ,2.201 + ,18.688 + ,12 + ,11.2 + ,2.725 + ,20.424 + ,13 + ,11.4 + ,2.408 + ,24.776 + ,12 + ,12.2 + ,2.139 + ,19.814 + ,9 + ,12.9 + ,1.898 + ,12.738 + ,10 + ,13.1 + ,2.537 + ,31.566 + ,8 + ,13.5 + ,2.069 + ,30.111 + ,11 + ,13.6 + ,2.063 + ,30.019 + ,8 + ,14.4 + ,2.524 + ,31.934 + ,8 + ,14.1 + ,2.437 + ,25.826 + ,8 + ,15.1 + ,2.189 + ,26.835 + ,4 + ,15.8 + ,2.793 + ,20.205 + ,6 + ,15.9 + ,2.074 + ,17.789 + ,8 + ,15.4 + ,2.622 + ,20.52 + ,10 + ,15.5 + ,2.278 + ,22.518 + ,5 + ,14.8 + ,2.144 + ,15.572 + ,6 + ,13.2 + ,2.427 + ,11.509 + ,5 + ,12.7 + ,2.139 + ,25.447 + ,9 + ,12.1 + ,1.828 + ,24.09 + ,8 + ,11.9 + ,2.072 + ,27.786 + ,6 + ,10.6 + ,1.8 + ,26.195 + ,9 + ,10.7 + ,1.758 + ,20.516 + ,11 + ,0.8 + ,2.246 + ,22.759 + ,11 + ,0.9 + ,1.987 + ,19.028 + ,8 + ,8.3 + ,1.868 + ,16.971 + ,11 + ,9.3 + ,2.514 + ,20.036 + ,11 + ,9 + ,2.121 + ,22.485 + ,13 + ,9.1) + ,dim=c(4 + ,61) + ,dimnames=list(c('gebouwen' + ,'auto' + ,'prijsindex' + ,'financielesituatie') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('gebouwen','auto','prijsindex','financielesituatie'),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/rcomp/tmp/13csz1258117475.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] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 0.4107, p-value = 0.6813 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.0360853 > 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/2sc261258117475.tab") > > system("convert tmp/13csz1258117475.ps tmp/13csz1258117475.png") > > > proc.time() user system elapsed 0.489 0.217 0.563