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(4.43 + ,109.1 + ,2187 + ,88.3 + ,4.61 + ,113.8 + ,1852 + ,88.6 + ,4.54 + ,97.4 + ,1570 + ,91 + ,4.2 + ,72.5 + ,1851 + ,91.5 + ,4.08 + ,82.7 + ,1954 + ,95.4 + ,3.95 + ,88.9 + ,1828 + ,98.7 + ,4.19 + ,105.9 + ,2251 + ,99.9 + ,4.23 + ,100.8 + ,2277 + ,98.6 + ,3.89 + ,94 + ,2085 + ,100.3 + ,3.92 + ,105 + ,2282 + ,100.2 + ,4.14 + ,58.5 + ,2266 + ,100.4 + ,4.24 + ,87.6 + ,1878 + ,101.4 + ,4.08 + ,113.1 + ,2267 + ,103 + ,4.37 + ,112.5 + ,2069 + ,109.1 + ,4.43 + ,89.6 + ,1746 + ,111.4 + ,4.3 + ,74.5 + ,2299 + ,114.1 + ,4.27 + ,82.7 + ,2360 + ,121.8 + ,4.06 + ,90.1 + ,2214 + ,127.6 + ,3.96 + ,109.4 + ,2825 + ,129.9 + ,4.21 + ,96 + ,2355 + ,128 + ,4.31 + ,89.2 + ,2333 + ,123.5 + ,4.35 + ,109.1 + ,3016 + ,124 + ,4.25 + ,49.1 + ,2155 + ,127.4 + ,4.06 + ,92.9 + ,2172 + ,127.6 + ,4 + ,107.7 + ,2150 + ,128.4 + ,3.87 + ,103.5 + ,2533 + ,131.4 + ,3.71 + ,91.1 + ,2058 + ,135.1 + ,3.63 + ,79.8 + ,2160 + ,134 + ,3.48 + ,71.9 + ,2259 + ,144.5 + ,3.6 + ,82.9 + ,2498 + ,147.3 + ,3.66 + ,90.1 + ,2695 + ,150.9 + ,3.45 + ,100.7 + ,2799 + ,148.7 + ,3.3 + ,90.7 + ,2945 + ,141.4 + ,3.14 + ,108.8 + ,2930 + ,138.9 + ,3.21 + ,44.1 + ,2318 + ,139.8 + ,3.12 + ,93.6 + ,2540 + ,145.6 + ,3.14 + ,107.4 + ,2570 + ,147.9 + ,3.4 + ,96.5 + ,2669 + ,148.5 + ,3.42 + ,93.6 + ,2450 + ,151.1 + ,3.29 + ,76.5 + ,2842 + ,157.5 + ,3.49 + ,76.7 + ,3439 + ,167.5 + ,3.52 + ,84 + ,2677 + ,172.3 + ,3.81 + ,103.3 + ,2979 + ,173.5 + ,4.03 + ,88.5 + ,2257 + ,187.5 + ,3.98 + ,99 + ,2842 + ,205.5 + ,4.1 + ,105.9 + ,2546 + ,195.1 + ,3.96 + ,44.7 + ,2455 + ,204.5 + ,3.83 + ,94 + ,2293 + ,204.5 + ,3.72 + ,107.1 + ,2379 + ,201.7 + ,3.82 + ,104.8 + ,2478 + ,207 + ,3.76 + ,102.5 + ,2054 + ,206.6 + ,3.98 + ,77.7 + ,2272 + ,210.6 + ,4.14 + ,85.2 + ,2351 + ,211.1 + ,4 + ,91.3 + ,2271 + ,215 + ,4.13 + ,106.5 + ,2542 + ,223.9 + ,4.28 + ,92.4 + ,2304 + ,238.2 + ,4.46 + ,97.5 + ,2194 + ,238.9 + ,4.63 + ,107 + ,2722 + ,229.6 + ,4.49 + ,51.1 + ,2395 + ,232.2 + ,4.41 + ,98.6 + ,2146 + ,222.1 + ,4.5 + ,102.2 + ,1894 + ,221.6 + ,4.39 + ,114.3 + ,2548 + ,227.3 + ,4.33 + ,99.4 + ,2087 + ,221 + ,4.45 + ,72.5 + ,2063 + ,213.6 + ,4.17 + ,92.3 + ,2481 + ,243.4 + ,4.13 + ,99.4 + ,2476 + ,253.8 + ,4.33 + ,85.9 + ,2212 + ,265.3 + ,4.47 + ,109.4 + ,2834 + ,268.2 + ,4.63 + ,97.6 + ,2148 + ,268.5 + ,4.9 + ,104.7 + ,2598 + ,266.9) + ,dim=c(4 + ,70) + ,dimnames=list(c('Rente' + ,'Ind.Prod.' + ,'Bouwvergunn.' + ,'Tot.pr.') + ,1:70)) > y <- array(NA,dim=c(4,70),dimnames=list(c('Rente','Ind.Prod.','Bouwvergunn.','Tot.pr.'),1:70)) > 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/1bhew1228480666.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.4959, p-value = 0.1347 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1226611 > 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/2d0bp1228480666.tab") > > system("convert tmp/1bhew1228480666.ps tmp/1bhew1228480666.png") > > > proc.time() user system elapsed 0.519 0.220 0.590