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(217859 + ,258778 + ,88827 + ,565464 + ,208679 + ,252791 + ,85874 + ,547344 + ,213188 + ,256389 + ,85211 + ,554788 + ,216234 + ,258961 + ,87130 + ,562325 + ,213587 + ,258647 + ,88620 + ,560854 + ,209465 + ,256304 + ,89563 + ,555332 + ,204045 + ,250498 + ,89056 + ,543599 + ,200237 + ,247883 + ,88542 + ,536662 + ,203666 + ,249552 + ,89504 + ,542722 + ,241476 + ,262626 + ,89428 + ,593530 + ,260307 + ,264416 + ,86040 + ,610763 + ,243324 + ,273049 + ,96240 + ,612613 + ,244460 + ,272441 + ,94423 + ,611324 + ,233575 + ,267564 + ,93028 + ,594167 + ,237217 + ,265952 + ,92285 + ,595454 + ,235243 + ,263937 + ,91685 + ,590865 + ,230354 + ,264765 + ,94260 + ,589379 + ,227184 + ,263386 + ,93858 + ,584428 + ,221678 + ,258985 + ,92437 + ,573100 + ,217142 + ,257334 + ,92980 + ,567456 + ,219452 + ,257477 + ,92099 + ,569028 + ,256446 + ,271486 + ,92803 + ,620735 + ,265845 + ,274488 + ,88551 + ,628884 + ,248624 + ,281274 + ,98334 + ,628232 + ,241114 + ,272674 + ,98329 + ,612117 + ,229245 + ,269704 + ,96455 + ,595404 + ,231805 + ,268227 + ,97109 + ,597141 + ,219277 + ,276444 + ,97687 + ,593408 + ,219313 + ,272247 + ,98512 + ,590072 + ,212610 + ,268516 + ,98673 + ,579799 + ,214771 + ,263406 + ,96028 + ,574205 + ,211142 + ,263619 + ,98014 + ,572775 + ,211457 + ,265905 + ,95580 + ,572942 + ,240048 + ,281681 + ,97838 + ,619567 + ,240636 + ,287413 + ,97760 + ,625809 + ,230580 + ,289423 + ,99913 + ,619916 + ,208795 + ,281242 + ,97588 + ,587625 + ,197922 + ,273878 + ,93942 + ,565742 + ,194596 + ,269022 + ,93656 + ,557274 + ,194581 + ,272630 + ,93365 + ,560576 + ,185686 + ,270287 + ,92881 + ,548854 + ,178106 + ,260447 + ,93120 + ,531673 + ,172608 + ,262248 + ,91063 + ,525919 + ,167302 + ,252806 + ,90930 + ,511038 + ,168053 + ,238663 + ,91946 + ,498662 + ,202300 + ,258438 + ,94624 + ,555362 + ,202388 + ,266719 + ,95484 + ,564591 + ,182516 + ,263279 + ,95862 + ,541657 + ,173476 + ,258064 + ,95530 + ,527070 + ,166444 + ,248828 + ,94574 + ,509846 + ,171297 + ,248284 + ,94677 + ,514258 + ,169701 + ,253376 + ,93845 + ,516922 + ,164182 + ,251846 + ,91533 + ,507561 + ,161914 + ,239494 + ,91214 + ,492622 + ,159612 + ,239709 + ,90922 + ,490243 + ,151001 + ,228793 + ,89563 + ,469357 + ,158114 + ,229521 + ,89945 + ,477580 + ,186530 + ,249999 + ,91850 + ,528379 + ,187069 + ,254016 + ,92505 + ,533590 + ,174330 + ,251178 + ,92437 + ,517945) + ,dim=c(4 + ,60) + ,dimnames=list(c('Vlaams' + ,'Waals' + ,'Brussels' + ,'België') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Vlaams','Waals','Brussels','België'),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/1z6m81229195579.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 = 5.9187, p-value = 3.245e-09 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5242938 > 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/23t021229195579.tab") > > system("convert tmp/1z6m81229195579.ps tmp/1z6m81229195579.png") > > > proc.time() user system elapsed 0.537 0.242 0.660