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(111.632 + ,123.560 + ,93.028 + ,283.042 + ,106.707 + ,122.117 + ,92.285 + ,276.687 + ,108.827 + ,121.782 + ,91.685 + ,277.915 + ,108.413 + ,121.789 + ,94.260 + ,277.128 + ,106.249 + ,122.273 + ,93.858 + ,277.103 + ,104.861 + ,121.683 + ,92.437 + ,275.037 + ,102.382 + ,119.869 + ,92.980 + ,270.150 + ,100.320 + ,118.873 + ,92.099 + ,267.140 + ,100.228 + ,117.607 + ,92.803 + ,264.993 + ,117.089 + ,122.783 + ,88.551 + ,287.259 + ,121.523 + ,124.454 + ,98.334 + ,291.186 + ,114.948 + ,127.064 + ,98.329 + ,292.300 + ,112.831 + ,125.166 + ,96.455 + ,288.186 + ,107.605 + ,124.554 + ,97.109 + ,281.477 + ,108.928 + ,124.272 + ,97.687 + ,282.656 + ,101.993 + ,128.836 + ,98.512 + ,280.190 + ,102.850 + ,127.408 + ,98.673 + ,280.408 + ,99.925 + ,126.420 + ,96.028 + ,276.836 + ,101.536 + ,124.465 + ,98.014 + ,275.216 + ,99.450 + ,124.526 + ,95.580 + ,274.352 + ,98.305 + ,124.379 + ,97.838 + ,271.311 + ,110.159 + ,130.189 + ,97.760 + ,289.802 + ,109.483 + ,132.196 + ,99.913 + ,290.726 + ,106.810 + ,134.893 + ,97.588 + ,292.300 + ,96.279 + ,132.709 + ,93.942 + ,278.506 + ,91.982 + ,129.955 + ,93.656 + ,269.826 + ,90.276 + ,127.947 + ,92.881 + ,265.861 + ,90.999 + ,130.369 + ,93.120 + ,269.034 + ,86.622 + ,129.852 + ,91.063 + ,264.176 + ,83.117 + ,124.278 + ,90.930 + ,255.198 + ,80.367 + ,126.141 + ,91.946 + ,253.353 + ,77.550 + ,121.743 + ,94.624 + ,246.057 + ,77.443 + ,110.898 + ,65.484 + ,235.372 + ,92.844 + ,117.707 + ,95.862 + ,258.556 + ,92.175 + ,120.738 + ,95.530 + ,260.993 + ,84.822 + ,121.445 + ,94.574 + ,254.663 + ,81.632 + ,120.439 + ,94.677 + ,250.643 + ,78.872 + ,116.313 + ,93.845 + ,243.422 + ,81.485 + ,117.173 + ,91.533 + ,247.105 + ,80.651 + ,119.773 + ,91.214 + ,248.541 + ,78.192 + ,119.639 + ,90.922 + ,245.039 + ,76.844 + ,113.006 + ,89.563 + ,237.080 + ,76.335 + ,113.776 + ,89.945 + ,237.085 + ,71.415 + ,107.866 + ,91.850 + ,225.554 + ,73.889 + ,106.924 + ,92.505 + ,226.839 + ,86.822 + ,114.562 + ,92.437 + ,247.934 + ,86.371 + ,115.367 + ,93.876 + ,248.333 + ,83.469 + ,116.602 + ,93.561 + ,246.969 + ,82.662 + ,114.393 + ,94.119 + ,245.098 + ,82.880 + ,115.140 + ,95.264 + ,246.263 + ,89.406 + ,117.623 + ,96.089 + ,255.765 + ,95.378 + ,119.361 + ,97.160 + ,264.319 + ,97.657 + ,120.527 + ,98.644 + ,268.347 + ,100.247 + ,121.660 + ,96.266 + ,273.046 + ,99.180 + ,122.852 + ,97.938 + ,273.963 + ,97.493 + ,119.325 + ,99.757 + ,267.430 + ,101.628 + ,119.151 + ,101.550 + ,271.993 + ,114.585 + ,126.494 + ,102.449 + ,292.710 + ,115.669 + ,127.832 + ,102.416 + ,295.881 + ,111.311 + ,128.780 + ,102.587 + ,293.299) + ,dim=c(4 + ,60) + ,dimnames=list(c('Vlaand' + ,'Wallonië' + ,'Brussel' + ,'België') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Vlaand','Wallonië','Brussel','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/14bbr1258122578.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 = 4.9493, p-value = 7.449e-07 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4384181 > 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/29pu71258122578.tab") > > system("convert tmp/14bbr1258122578.ps tmp/14bbr1258122578.png") > > > proc.time() user system elapsed 0.497 0.214 0.555