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(283042 + ,328282 + ,611324.00 + ,276687 + ,317480 + ,594167.00 + ,277915 + ,317539 + ,595454.00 + ,277128 + ,313737 + ,590865.00 + ,277103 + ,312276 + ,589379.00 + ,275037 + ,309391 + ,584428.00 + ,270150 + ,302950 + ,573100.00 + ,267140 + ,300316 + ,567456.00 + ,264993 + ,304035 + ,569028.00 + ,287259 + ,333476 + ,620735.00 + ,291186 + ,337698 + ,628884.00 + ,292300 + ,335932 + ,628232.00 + ,288186 + ,323931 + ,612117.00 + ,281477 + ,313927 + ,595404.00 + ,282656 + ,314485 + ,597141.00 + ,280190 + ,313218 + ,593408.00 + ,280408 + ,309664 + ,590072.00 + ,276836 + ,302963 + ,579799.00 + ,275216 + ,298989 + ,574205.00 + ,274352 + ,298423 + ,572775.00 + ,271311 + ,301631 + ,572942.00 + ,289802 + ,329765 + ,619567.00 + ,290726 + ,335083 + ,625809.00 + ,292300 + ,327616 + ,619916.00 + ,278506 + ,309119 + ,587625.00 + ,269826 + ,295916 + ,565742.00 + ,265861 + ,291413 + ,557274.00 + ,269034 + ,291542 + ,560576.00 + ,264176 + ,284678 + ,548854.00 + ,255198 + ,276475 + ,531673.00 + ,253353 + ,272566 + ,525919.00 + ,246057 + ,264981 + ,511038.00 + ,235372 + ,263290 + ,498662.00 + ,258556 + ,296806 + ,555362.00 + ,260993 + ,303598 + ,564591.00 + ,254663 + ,286994 + ,541657.00 + ,250643 + ,276427 + ,527070.00 + ,243422 + ,266424 + ,509846.00 + ,247105 + ,267153 + ,514258.00 + ,248541 + ,268381 + ,516922.00 + ,245039 + ,262522 + ,507561.00 + ,237080 + ,255542 + ,492622.00 + ,237085 + ,253158 + ,490243.00 + ,225554 + ,243803 + ,469357.00 + ,226839 + ,250741 + ,477580.00 + ,247934 + ,280445 + ,528379.00 + ,248333 + ,285257 + ,533590.00 + ,246969 + ,270976 + ,517945.00 + ,245098 + ,261076 + ,506174.00 + ,246263 + ,255603 + ,501866.00 + ,255765 + ,260376 + ,516141.00 + ,264319 + ,263903 + ,528222.00 + ,268347 + ,264291 + ,532638.00 + ,273046 + ,263276 + ,536322.00 + ,273963 + ,262572 + ,536535.00 + ,267430 + ,256167 + ,523597.00 + ,271993 + ,264221 + ,536214.00 + ,292710 + ,293860 + ,586570.00 + ,295881 + ,300713 + ,596594.00 + ,293299 + ,287224 + ,580523.00) + ,dim=c(3 + ,60) + ,dimnames=list(c('MAN' + ,'VROUW' + ,'TOTAAL') + ,1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('MAN','VROUW','TOTAAL'),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/1tz8e1258738499.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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 7.2901, p-value = 3.098e-13 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6459452 > 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/24lom1258738499.tab") > > system("convert tmp/1tz8e1258738499.ps tmp/1tz8e1258738499.png") > > > proc.time() user system elapsed 0.452 0.189 0.568