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(96.8 + ,92.9 + ,285351 + ,325412 + ,114.1 + ,107.7 + ,286602 + ,326011 + ,110.3 + ,103.5 + ,283042 + ,328282 + ,103.9 + ,91.1 + ,276687 + ,317480 + ,101.6 + ,79.8 + ,277915 + ,317539 + ,94.6 + ,71.9 + ,277128 + ,313737 + ,95.9 + ,82.9 + ,277103 + ,312276 + ,104.7 + ,90.1 + ,275037 + ,309391 + ,102.8 + ,100.7 + ,270150 + ,302950 + ,98.1 + ,90.7 + ,267140 + ,300316 + ,113.9 + ,108.8 + ,264993 + ,304035 + ,80.9 + ,44.1 + ,287259 + ,333476 + ,95.7 + ,93.6 + ,291186 + ,337698 + ,113.2 + ,107.4 + ,292300 + ,335932 + ,105.9 + ,96.5 + ,288186 + ,323931 + ,108.8 + ,93.6 + ,281477 + ,313927 + ,102.3 + ,76.5 + ,282656 + ,314485 + ,99 + ,76.7 + ,280190 + ,313218 + ,100.7 + ,84 + ,280408 + ,309664 + ,115.5 + ,103.3 + ,276836 + ,302963 + ,100.7 + ,88.5 + ,275216 + ,298989 + ,109.9 + ,99 + ,274352 + ,298423 + ,114.6 + ,105.9 + ,271311 + ,301631 + ,85.4 + ,44.7 + ,289802 + ,329765 + ,100.5 + ,94 + ,290726 + ,335083 + ,114.8 + ,107.1 + ,292300 + ,327616 + ,116.5 + ,104.8 + ,278506 + ,309119 + ,112.9 + ,102.5 + ,269826 + ,295916 + ,102 + ,77.7 + ,265861 + ,291413 + ,106 + ,85.2 + ,269034 + ,291542 + ,105.3 + ,91.3 + ,264176 + ,284678 + ,118.8 + ,106.5 + ,255198 + ,276475 + ,106.1 + ,92.4 + ,253353 + ,272566 + ,109.3 + ,97.5 + ,246057 + ,264981 + ,117.2 + ,107 + ,235372 + ,263290 + ,92.5 + ,51.1 + ,258556 + ,296806 + ,104.2 + ,98.6 + ,260993 + ,303598 + ,112.5 + ,102.2 + ,254663 + ,286994 + ,122.4 + ,114.3 + ,250643 + ,276427 + ,113.3 + ,99.4 + ,243422 + ,266424 + ,100 + ,72.5 + ,247105 + ,267153 + ,110.7 + ,92.3 + ,248541 + ,268381 + ,112.8 + ,99.4 + ,245039 + ,262522 + ,109.8 + ,85.9 + ,237080 + ,255542 + ,117.3 + ,109.4 + ,237085 + ,253158 + ,109.1 + ,97.6 + ,225554 + ,243803 + ,115.9 + ,104.7 + ,226839 + ,250741 + ,96 + ,56.9 + ,247934 + ,280445 + ,99.8 + ,86.7 + ,248333 + ,285257 + ,116.8 + ,108.5 + ,246969 + ,270976 + ,115.7 + ,103.4 + ,245098 + ,261076 + ,99.4 + ,86.2 + ,246263 + ,255603 + ,94.3 + ,71 + ,255765 + ,260376 + ,91 + ,75.9 + ,264319 + ,263903 + ,93.2 + ,87.1 + ,268347 + ,264291 + ,103.1 + ,102 + ,273046 + ,263276 + ,94.1 + ,88.5 + ,273963 + ,262572 + ,91.8 + ,87.8 + ,267430 + ,256167 + ,102.7 + ,100.8 + ,271993 + ,264221 + ,82.6 + ,50.6 + ,292710 + ,293860) + ,dim=c(4 + ,60) + ,dimnames=list(c('Totaleindustrie' + ,'Bouwnijverheid' + ,'Mannen' + ,'Vrouwen') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Totaleindustrie','Bouwnijverheid','Mannen','Vrouwen'),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/10oy61258360680.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 = 7.7434, p-value = 9.77e-15 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6866517 > 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/2hx0x1258360680.tab") > > system("convert tmp/10oy61258360680.ps tmp/10oy61258360680.png") > > > proc.time() user system elapsed 0.498 0.217 1.333