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(5560 + ,433 + ,34.97 + ,36.68 + ,3922 + ,344 + ,34.97 + ,36.7 + ,3759 + ,357 + ,34.93 + ,36.71 + ,4138 + ,385 + ,34.92 + ,36.72 + ,4634 + ,392 + ,34.97 + ,36.73 + ,3996 + ,308 + ,34.97 + ,36.73 + ,4308 + ,294 + ,34.97 + ,36.87 + ,4429 + ,302 + ,35.38 + ,37.31 + ,5219 + ,400 + ,35.64 + ,37.39 + ,4929 + ,392 + ,35.9 + ,37.42 + ,5755 + ,373 + ,36.01 + ,37.51 + ,5592 + ,379 + ,36.03 + ,37.67 + ,4163 + ,303 + ,36.04 + ,37.67 + ,4962 + ,324 + ,36.06 + ,37.71 + ,5208 + ,353 + ,36.09 + ,37.78 + ,4755 + ,392 + ,36.15 + ,37.79 + ,4491 + ,327 + ,36.15 + ,37.84 + ,5732 + ,376 + ,36.15 + ,37.88 + ,5731 + ,329 + ,36.1 + ,38.34 + ,5040 + ,359 + ,36.38 + ,38.58 + ,6102 + ,413 + ,36.89 + ,38.72 + ,4904 + ,338 + ,37 + ,38.83 + ,5369 + ,422 + ,37.09 + ,38.9 + ,5578 + ,390 + ,37.13 + ,38.92 + ,4619 + ,370 + ,37.24 + ,38.94 + ,4731 + ,367 + ,37.29 + ,39.1 + ,5011 + ,406 + ,37.34 + ,39.14 + ,5299 + ,418 + ,37.49 + ,39.16 + ,4146 + ,346 + ,37.49 + ,39.32 + ,4625 + ,350 + ,37.54 + ,39.34 + ,4736 + ,329 + ,37.67 + ,39.44 + ,4219 + ,318 + ,38.13 + ,39.92 + ,5116 + ,381 + ,38.68 + ,40.19 + ,4205 + ,337 + ,38.77 + ,40.2 + ,4121 + ,372 + ,39 + ,40.27 + ,5103 + ,422 + ,39.03 + ,40.28 + ,4300 + ,427 + ,39.03 + ,40.3 + ,4578 + ,426 + ,39.04 + ,40.34 + ,3809 + ,396 + ,39.16 + ,40.4 + ,5526 + ,458 + ,39.23 + ,40.43 + ,4247 + ,314 + ,39.26 + ,40.48 + ,3830 + ,336 + ,39.25 + ,40.48 + ,4394 + ,385 + ,39.41 + ,40.63 + ,4826 + ,351 + ,39.56 + ,40.74 + ,4409 + ,381 + ,39.69 + ,40.77 + ,4569 + ,438 + ,39.87 + ,40.91 + ,4106 + ,397 + ,39.83 + ,40.92 + ,4794 + ,451 + ,39.84 + ,41.03 + ,3914 + ,362 + ,39.85 + ,41 + ,3793 + ,363 + ,39.91 + ,41.04 + ,4405 + ,468 + ,40.62 + ,41.33 + ,4022 + ,371 + ,40.73 + ,41.44 + ,4100 + ,407 + ,40.86 + ,41.46 + ,4788 + ,391 + ,40.89 + ,41.55 + ,3163 + ,364 + ,40.9 + ,41.55 + ,3585 + ,366 + ,41.15 + ,41.81 + ,3903 + ,424 + ,41.24 + ,41.78 + ,4178 + ,364 + ,41.24 + ,41.84 + ,3863 + ,366 + ,41.33 + ,41.84 + ,4187 + ,423 + ,41.36 + ,41.86) + ,dim=c(4 + ,60) + ,dimnames=list(c('Bouwvergunningen_woningen' + ,'Bouwvergunningen_gebouwen' + ,'Uurtarief_elektricien' + ,'Uurtarief_loodgieter') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Bouwvergunningen_woningen','Bouwvergunningen_gebouwen','Uurtarief_elektricien','Uurtarief_loodgieter'),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/1z20s1257694758.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 = 1.8436, p-value = 0.06524 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1636935 > 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/2zxj01257694758.tab") > > system("convert tmp/1z20s1257694758.ps tmp/1z20s1257694758.png") > > > proc.time() user system elapsed 0.506 0.230 0.631