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(100.5 + ,79.8 + ,107.5 + ,109.87 + ,94.2 + ,83.4 + ,108.8 + ,95.74 + ,115.9 + ,113.6 + ,128.4 + ,123.06 + ,111.9 + ,112.9 + ,121.1 + ,123.39 + ,106.5 + ,104 + ,119.5 + ,120.28 + ,96.3 + ,109.9 + ,128.7 + ,115.33 + ,96.6 + ,99 + ,108.7 + ,110.4 + ,96.1 + ,106.3 + ,105.5 + ,114.49 + ,102.9 + ,128.9 + ,119.8 + ,132.03 + ,101.9 + ,111.1 + ,111.3 + ,123.16 + ,98.2 + ,102.9 + ,110.6 + ,118.82 + ,110.9 + ,130 + ,120.1 + ,128.32 + ,87.2 + ,87 + ,97.5 + ,112.24 + ,91.7 + ,87.5 + ,107.7 + ,104.53 + ,108.5 + ,117.6 + ,127.3 + ,132.57 + ,102.8 + ,103.4 + ,117.2 + ,122.52 + ,105.4 + ,110.8 + ,119.8 + ,131.8 + ,129.8 + ,112.6 + ,116.2 + ,124.55 + ,110.9 + ,102.5 + ,111 + ,120.96 + ,106 + ,112.4 + ,112.4 + ,122.6 + ,109.1 + ,135.6 + ,130.6 + ,145.52 + ,104.2 + ,105.1 + ,109.1 + ,118.57 + ,105 + ,127.7 + ,118.8 + ,134.25 + ,106.2 + ,137 + ,123.9 + ,136.7 + ,105.2 + ,91 + ,101.6 + ,121.37 + ,105.6 + ,90.5 + ,112.8 + ,111.63 + ,108.5 + ,122.4 + ,128 + ,134.42 + ,112.5 + ,123.3 + ,129.6 + ,137.65 + ,107 + ,124.3 + ,125.8 + ,137.86 + ,108.9 + ,120 + ,119.5 + ,119.77 + ,109.9 + ,118.1 + ,115.7 + ,130.69 + ,106.2 + ,119 + ,113.6 + ,128.28 + ,112 + ,142.7 + ,129.7 + ,147.45 + ,104.1 + ,123.6 + ,112 + ,128.42 + ,105 + ,129.6 + ,116.8 + ,136.9 + ,108.3 + ,151.6 + ,127 + ,143.95 + ,102.4 + ,110.4 + ,112.1 + ,135.64 + ,106.7 + ,99.2 + ,114.2 + ,122.48 + ,107.1 + ,130.5 + ,121.1 + ,136.83 + ,115.7 + ,136.2 + ,131.6 + ,153.04 + ,109.7 + ,129.7 + ,125 + ,142.71 + ,108.1 + ,128 + ,120.4 + ,123.46 + ,114 + ,121.6 + ,117.7 + ,144.37 + ,111.7 + ,135.8 + ,117.5 + ,146.15 + ,109.5 + ,143.8 + ,120.6 + ,147.61 + ,103.3 + ,147.5 + ,127.5 + ,158.51 + ,102.1 + ,136.2 + ,112.3 + ,147.4 + ,104.4 + ,156.6 + ,124.5 + ,165.05 + ,101.5 + ,123.3 + ,115.2 + ,154.64 + ,103.9 + ,104.5 + ,104.7 + ,126.2 + ,106 + ,139.8 + ,130.9 + ,157.36 + ,109.8 + ,136.5 + ,129.2 + ,154.15 + ,106.9 + ,112.1 + ,113.5 + ,123.21 + ,106.7 + ,118.5 + ,125.6 + ,113.07 + ,107 + ,94.4 + ,107.6 + ,110.45 + ,100.7 + ,102.3 + ,107 + ,113.57 + ,102.7 + ,111.4 + ,121.6 + ,122.44 + ,96.7 + ,99.2 + ,110.7 + ,114.93 + ,98.4 + ,87.8 + ,106.3 + ,111.85 + ,102 + ,115.8 + ,118.6 + ,126.04) + ,dim=c(4 + ,60) + ,dimnames=list(c('inter' + ,'inves' + ,'cons' + ,'uitv') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('inter','inves','cons','uitv'),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/116w71257332614.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 = 3.9806, p-value = 6.873e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3535413 > 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/2iksi1257332615.tab") > > system("convert tmp/116w71257332614.ps tmp/116w71257332614.png") > > > proc.time() user system elapsed 0.485 0.213 1.803