R version 2.8.1 (2008-12-22) Copyright (C) 2008 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(370.58 + ,7.55 + ,42.97 + ,0.8 + ,370.58 + ,7.55 + ,42.98 + ,0.8 + ,370.22 + ,7.59 + ,43.01 + ,0.8 + ,370.21 + ,7.59 + ,43.09 + ,0.8 + ,370.29 + ,7.59 + ,43.14 + ,0.8 + ,370.29 + ,7.57 + ,43.39 + ,0.8 + ,370.2 + ,7.57 + ,43.46 + ,0.8 + ,370.2 + ,7.59 + ,43.54 + ,0.8 + ,372.55 + ,7.6 + ,43.62 + ,0.81 + ,374.51 + ,7.64 + ,44.01 + ,0.81 + ,375.58 + ,7.64 + ,44.5 + ,0.81 + ,375.75 + ,7.76 + ,44.73 + ,0.81 + ,375.75 + ,7.76 + ,44.89 + ,0.81 + ,375.75 + ,7.76 + ,45.09 + ,0.81 + ,375.69 + ,7.77 + ,45.17 + ,0.81 + ,375.76 + ,7.83 + ,45.24 + ,0.81 + ,377.5 + ,7.94 + ,45.42 + ,0.81 + ,377.51 + ,7.94 + ,45.67 + ,0.81 + ,377.74 + ,7.94 + ,45.68 + ,0.81 + ,369.82 + ,8.09 + ,46.56 + ,0.81 + ,373.1 + ,8.18 + ,46.72 + ,0.82 + ,374.55 + ,8.26 + ,47.01 + ,0.82 + ,375.01 + ,8.28 + ,47.26 + ,0.82 + ,374.81 + ,8.28 + ,47.49 + ,0.82 + ,375.31 + ,8.28 + ,47.51 + ,0.82 + ,375.31 + ,8.29 + ,47.52 + ,0.82 + ,375.39 + ,8.3 + ,47.66 + ,0.82 + ,375.59 + ,8.3 + ,47.71 + ,0.82 + ,376.26 + ,8.31 + ,47.87 + ,0.82 + ,377.18 + ,8.33 + ,48 + ,0.82 + ,377.26 + ,8.33 + ,48 + ,0.82 + ,377.26 + ,8.34 + ,48.05 + ,0.82 + ,381.87 + ,8.48 + ,48.25 + ,0.89 + ,387.09 + ,8.59 + ,48.72 + ,0.89 + ,387.14 + ,8.67 + ,48.94 + ,0.89 + ,388.78 + ,8.67 + ,49.16 + ,0.89 + ,389.16 + ,8.67 + ,49.18 + ,0.89 + ,389.16 + ,8.71 + ,49.25 + ,0.89 + ,389.42 + ,8.72 + ,49.34 + ,0.89 + ,389.49 + ,8.72 + ,49.49 + ,0.89 + ,388.97 + ,8.72 + ,49.57 + ,0.89 + ,388.97 + ,8.74 + ,49.63 + ,0.89 + ,389.09 + ,8.74 + ,49.67 + ,0.89 + ,389.09 + ,8.74 + ,49.7 + ,0.89 + ,391.76 + ,8.74 + ,49.8 + ,0.91 + ,390.96 + ,8.79 + ,50.09 + ,0.91 + ,391.76 + ,8.85 + ,50.49 + ,0.91 + ,392.8 + ,8.86 + ,50.73 + ,0.91 + ,393.06 + ,8.87 + ,51.12 + ,0.91 + ,393.06 + ,8.92 + ,51.15 + ,0.93 + ,393.26 + ,8.96 + ,51.41 + ,0.93 + ,393.87 + ,8.97 + ,51.61 + ,0.93 + ,394.47 + ,8.99 + ,52.06 + ,0.93 + ,394.57 + ,8.98 + ,52.17 + ,0.93 + ,394.57 + ,8.98 + ,52.18 + ,0.93 + ,394.57 + ,9.01 + ,52.19 + ,0.93 + ,399.57 + ,9.01 + ,52.74 + ,0.95 + ,406.13 + ,9.03 + ,53.05 + ,0.95 + ,407.03 + ,9.05 + ,53.38 + ,0.95 + ,409.46 + ,9.05 + ,53.78 + ,0.95) + ,dim=c(4 + ,60) + ,dimnames=list(c('Fiets' + ,'Taxi' + ,'Garage' + ,'Bus') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Fiets','Taxi','Garage','Bus'),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/rcomp/tmp/1ya1p1258041318.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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 = 9.253, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8306228 > 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/rcomp/tmp/2yuae1258041318.tab") > > system("convert tmp/1ya1p1258041318.ps tmp/1ya1p1258041318.png") > > > proc.time() user system elapsed 0.420 0.370 0.764