R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(103.1 + ,0.96 + ,41086 + ,96.67 + ,103.1 + ,1 + ,39690 + ,96.67 + ,103.3 + ,1.05 + ,43129 + ,96.67 + ,103.5 + ,1.03 + ,37863 + ,96.67 + ,103.3 + ,1.07 + ,35953 + ,96.67 + ,103.5 + ,1.12 + ,29133 + ,96.67 + ,103.8 + ,1.1 + ,24693 + ,96.67 + ,103.9 + ,1.06 + ,22205 + ,97.59 + ,103.9 + ,1.11 + ,21725 + ,97.59 + ,104.2 + ,1.08 + ,27192 + ,97.59 + ,104.6 + ,1.07 + ,21790 + ,97.06 + ,104.9 + ,1.02 + ,13253 + ,97.06 + ,105.2 + ,1 + ,37702 + ,97.06 + ,105.2 + ,1.04 + ,30364 + ,97.06 + ,105.6 + ,1.02 + ,32609 + ,97.06 + ,105.6 + ,1.07 + ,30212 + ,97.36 + ,106.2 + ,1.12 + ,29965 + ,97.43 + ,106.3 + ,1.08 + ,28352 + ,97.43 + ,106.4 + ,1.02 + ,25814 + ,97.43 + ,106.9 + ,1.01 + ,22414 + ,97.43 + ,107.2 + ,1.04 + ,20506 + ,97.43 + ,107.3 + ,0.98 + ,28806 + ,97.08 + ,107.3 + ,0.95 + ,22228 + ,97.08 + ,107.4 + ,0.94 + ,13971 + ,97.08 + ,107.55 + ,0.94 + ,36845 + ,97.08 + ,107.87 + ,0.96 + ,35338 + ,97.55 + ,108.37 + ,0.97 + ,35022 + ,97.55 + ,108.38 + ,1.03 + ,34777 + ,97.55 + ,107.92 + ,1.01 + ,26887 + ,97.55 + ,108.03 + ,0.99 + ,23970 + ,101.47 + ,108.14 + ,1 + ,22780 + ,101.47 + ,108.3 + ,1 + ,17351 + ,101.47 + ,108.64 + ,1.02 + ,21382 + ,101.47 + ,108.66 + ,1.01 + ,24561 + ,100.9 + ,109.04 + ,0.99 + ,17409 + ,100.9 + ,109.03 + ,0.98 + ,11514 + ,100.9 + ,109.03 + ,1.01 + ,31514 + ,102.31 + ,109.54 + ,1.03 + ,27071 + ,102.31 + ,109.75 + ,1.03 + ,29462 + ,102.31 + ,109.83 + ,1 + ,26105 + ,102.31 + ,109.65 + ,0.96 + ,22397 + ,102.31 + ,109.82 + ,0.97 + ,23843 + ,102.64 + ,109.95 + ,0.98 + ,21705 + ,102.64 + ,110.12 + ,1.02 + ,18089 + ,102.64 + ,110.15 + ,1.04 + ,20764 + ,102.64 + ,110.2 + ,1.01 + ,25316 + ,101.94 + ,109.99 + ,1.01 + ,17704 + ,101.94 + ,110.14 + ,1 + ,15548 + ,101.94 + ,110.14 + ,1.01 + ,28029 + ,102.34 + ,110.81 + ,1.02 + ,29383 + ,102.34 + ,110.97 + ,1.03 + ,36438 + ,102.34 + ,110.99 + ,1.06 + ,32034 + ,102.34 + ,109.73 + ,1.12 + ,22679 + ,102.34 + ,109.81 + ,1.12 + ,24319 + ,102.34 + ,110.02 + ,1.13 + ,18004 + ,102.34 + ,110.18 + ,1.13 + ,17537 + ,102.34 + ,110.21 + ,1.13 + ,20366 + ,102.34 + ,110.25 + ,1.17 + ,22782 + ,102.45 + ,110.36 + ,1.14 + ,19169 + ,102.45 + ,110.51 + ,1.08 + ,13807 + ,102.45 + ,110.64 + ,1.07 + ,29743 + ,102.5 + ,110.95 + ,1.12 + ,25591 + ,102.45 + ,111.18 + ,1.14 + ,29096 + ,102.45 + ,111.19 + ,1.21 + ,26482 + ,102.45 + ,111.69 + ,1.2 + ,22405 + ,102.45 + ,111.7 + ,1.23 + ,27044 + ,102.45 + ,111.83 + ,1.29 + ,17970 + ,102.45 + ,111.77 + ,1.31 + ,18730 + ,102.45 + ,111.73 + ,1.37 + ,19684 + ,102.45 + ,112.01 + ,1.35 + ,19785 + ,104.77 + ,111.86 + ,1.26 + ,18479 + ,104.77 + ,112.04 + ,1.26 + ,10698 + ,104.77) + ,dim=c(4 + ,72) + ,dimnames=list(c('prijs' + ,'benz' + ,'insch' + ,'BA') + ,1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('prijs','benz','insch','BA'),1:72)) > 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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/1z5ne1197034602.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 > 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 = 3.7753, p-value = 0.0001598 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3097393 > 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/2cwts1197034602.tab") > > system("convert tmp/1z5ne1197034602.ps tmp/1z5ne1197034602.png") > > > proc.time() user system elapsed 0.763 0.217 0.829