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(581000 + ,282965 + ,111632 + ,37391 + ,597000 + ,276610 + ,106707 + ,38540 + ,587000 + ,277838 + ,108827 + ,38022 + ,536000 + ,277051 + ,108413 + ,34470 + ,524000 + ,277026 + ,106249 + ,33227 + ,537000 + ,274960 + ,104861 + ,33411 + ,536000 + ,270073 + ,102382 + ,33616 + ,533000 + ,267063 + ,100320 + ,32618 + ,528000 + ,264916 + ,100228 + ,31759 + ,516000 + ,287182 + ,117089 + ,29951 + ,502000 + ,291109 + ,121523 + ,28022 + ,506000 + ,292223 + ,114948 + ,27823 + ,518000 + ,288109 + ,112831 + ,27730 + ,534000 + ,281400 + ,107605 + ,28472 + ,528000 + ,282579 + ,108928 + ,28468 + ,478000 + ,280113 + ,101993 + ,24910 + ,469000 + ,280331 + ,102850 + ,24312 + ,490000 + ,276759 + ,99925 + ,26180 + ,493000 + ,275139 + ,101536 + ,26121 + ,508000 + ,274275 + ,99450 + ,26696 + ,517000 + ,271234 + ,98305 + ,27206 + ,514000 + ,289725 + ,110159 + ,27210 + ,510000 + ,290649 + ,109483 + ,26646 + ,527000 + ,292223 + ,106810 + ,27441 + ,542000 + ,278429 + ,96279 + ,28143 + ,565000 + ,269749 + ,91982 + ,30134 + ,555000 + ,265784 + ,90276 + ,30393 + ,499000 + ,268957 + ,90999 + ,26203 + ,511000 + ,264099 + ,86622 + ,26374 + ,526000 + ,255121 + ,83117 + ,27182 + ,532000 + ,253276 + ,80367 + ,28060 + ,549000 + ,245980 + ,77550 + ,29175 + ,561000 + ,235295 + ,77443 + ,30522 + ,557000 + ,258479 + ,92844 + ,30083 + ,566000 + ,260916 + ,92175 + ,30713 + ,588000 + ,254586 + ,84822 + ,32013 + ,620000 + ,250566 + ,81632 + ,35395 + ,626000 + ,243345 + ,78872 + ,35816 + ,620000 + ,247028 + ,81485 + ,36057 + ,573000 + ,248464 + ,80651 + ,33169 + ,573000 + ,244962 + ,78192 + ,33792 + ,574000 + ,237003 + ,76844 + ,34412 + ,580000 + ,237008 + ,76335 + ,33935 + ,590000 + ,225477 + ,71415 + ,34500 + ,593000 + ,226762 + ,73899 + ,34286 + ,597000 + ,247857 + ,86822 + ,36007 + ,595000 + ,248256 + ,86371 + ,35701 + ,612000 + ,246892 + ,83469 + ,36830 + ,628000 + ,245021 + ,82662 + ,37250 + ,629000 + ,246186 + ,82880 + ,39284 + ,621000 + ,255688 + ,89406 + ,38192 + ,569000 + ,264242 + ,95378 + ,33347 + ,567000 + ,268270 + ,97657 + ,33357 + ,573000 + ,272969 + ,100247 + ,33654 + ,584000 + ,273886 + ,99180 + ,34390 + ,589000 + ,267353 + ,97493 + ,34715 + ,591000 + ,271916 + ,101628 + ,35377 + ,595000 + ,292633 + ,114585 + ,35415 + ,594000 + ,295804 + ,115669 + ,34718 + ,611000 + ,293222 + ,111311 + ,36021) + ,dim=c(4 + ,60) + ,dimnames=list(c('WLH_België' + ,'WLH_MBEL' + ,'WLH_MVL' + ,'WLH_MA') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('WLH_België','WLH_MBEL','WLH_MVL','WLH_MA'),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/15hw11257811072.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 = -3.8849, p-value = 0.0001024 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.3449455 > 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/2lqve1257811072.tab") > system("convert tmp/15hw11257811072.ps tmp/15hw11257811072.png") > > > proc.time() user system elapsed 0.484 0.209 0.635