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(101.26 + ,91.70 + ,77.21 + ,101.08 + ,74.44 + ,81.52 + ,100.00 + ,100.00 + ,100.00 + ,98.02 + ,74.99 + ,87.41 + ,96.76 + ,76.27 + ,64.23 + ,97.84 + ,105.90 + ,71.41 + ,107.03 + ,74.70 + ,51.22 + ,110.09 + ,71.60 + ,48.64 + ,110.45 + ,78.82 + ,55.06 + ,110.09 + ,88.27 + ,63.65 + ,107.03 + ,76.11 + ,54.83 + ,107.21 + ,82.06 + ,40.83 + ,106.49 + ,78.91 + ,83.69 + ,106.13 + ,84.36 + ,74.18 + ,105.23 + ,99.41 + ,85.44 + ,103.24 + ,93.89 + ,79.01 + ,102.16 + ,109.62 + ,67.92 + ,102.52 + ,106.51 + ,80.67 + ,111.89 + ,79.30 + ,53.28 + ,113.33 + ,94.51 + ,54.31 + ,113.15 + ,99.20 + ,57.99 + ,110.27 + ,90.57 + ,60.25 + ,107.21 + ,85.54 + ,58.05 + ,107.57 + ,109.18 + ,34.12 + ,106.85 + ,109.16 + ,95.26 + ,106.31 + ,96.00 + ,89.41 + ,104.50 + ,116.23 + ,106.63 + ,103.42 + ,93.41 + ,83.90 + ,103.24 + ,102.27 + ,83.21 + ,103.24 + ,106.25 + ,75.88 + ,111.71 + ,87.98 + ,58.09 + ,112.79 + ,90.11 + ,54.10 + ,111.71 + ,95.45 + ,57.26 + ,105.95 + ,100.93 + ,67.79 + ,101.98 + ,78.97 + ,56.72 + ,100.36 + ,88.10 + ,34.51 + ,101.08 + ,90.21 + ,91.31 + ,98.92 + ,80.36 + ,80.10 + ,95.86 + ,97.45 + ,97.17 + ,94.77 + ,80.10 + ,78.26 + ,92.07 + ,78.50 + ,77.23 + ,89.91 + ,97.20 + ,82.16 + ,100.00 + ,81.90 + ,65.17 + ,101.80 + ,87.20 + ,55.56 + ,97.66 + ,72.55 + ,59.97 + ,94.95 + ,105.26 + ,75.42 + ,91.89 + ,80.90 + ,59.51 + ,92.61 + ,72.95 + ,38.84 + ,93.15 + ,83.70 + ,93.18 + ,91.53 + ,91.92 + ,91.74 + ,88.83 + ,83.98 + ,93.80 + ,88.29 + ,87.03 + ,101.36 + ,84.50 + ,78.21 + ,79.60 + ,86.13 + ,91.31 + ,83.25 + ,95.14 + ,74.55 + ,64.49 + ,96.22 + ,72.25 + ,54.04 + ,93.33 + ,83.90 + ,62.03 + ,91.17 + ,76.61 + ,70.43 + ,90.45 + ,78.10 + ,49.78 + ,92.97 + ,91.20 + ,35.72) + ,dim=c(3 + ,60) + ,dimnames=list(c('Werk' + ,'Bouw' + ,'Auto') + ,1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('Werk','Bouw','Auto'),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/19uqu1258231868.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 = 1.6267, p-value = 0.1038 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1444355 > 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/2rrn91258231868.tab") > > system("convert tmp/19uqu1258231868.ps tmp/19uqu1258231868.png") > > > proc.time() user system elapsed 0.462 0.194 0.512