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(84 + ,122.2 + ,83.4 + ,108.8 + ,78 + ,122.6 + ,113.6 + ,128.4 + ,74 + ,122.2 + ,112.9 + ,121.1 + ,75 + ,118.8 + ,104 + ,119.5 + ,79 + ,119 + ,109.9 + ,128.7 + ,79 + ,118.2 + ,99 + ,108.7 + ,82 + ,117.8 + ,106.3 + ,105.5 + ,88 + ,116.8 + ,128.9 + ,119.8 + ,81 + ,114.6 + ,111.1 + ,111.3 + ,69 + ,113.4 + ,102.9 + ,110.6 + ,62 + ,113.8 + ,130 + ,120.1 + ,62 + ,124.2 + ,87 + ,97.5 + ,68 + ,125.8 + ,87.5 + ,107.7 + ,57 + ,125.6 + ,117.6 + ,127.3 + ,67 + ,122.4 + ,103.4 + ,117.2 + ,72 + ,119 + ,110.8 + ,119.8 + ,75 + ,119.4 + ,112.6 + ,116.2 + ,81 + ,118.6 + ,102.5 + ,111 + ,80 + ,118 + ,112.4 + ,112.4 + ,79 + ,116 + ,135.6 + ,130.6 + ,81 + ,114.8 + ,105.1 + ,109.1 + ,83 + ,114.6 + ,127.7 + ,118.8 + ,84 + ,114.6 + ,137 + ,123.9 + ,90 + ,124 + ,91 + ,101.6 + ,84 + ,125.2 + ,90.5 + ,112.8 + ,90 + ,124 + ,122.4 + ,128 + ,92 + ,117.6 + ,123.3 + ,129.6 + ,93 + ,113.2 + ,124.3 + ,125.8 + ,85 + ,111.4 + ,120 + ,119.5 + ,93 + ,112.2 + ,118.1 + ,115.7 + ,94 + ,109.8 + ,119 + ,113.6 + ,94 + ,106.4 + ,142.7 + ,129.7 + ,102 + ,105.2 + ,123.6 + ,112 + ,96 + ,102.2 + ,129.6 + ,116.8 + ,96 + ,99.8 + ,151.6 + ,127 + ,92 + ,111 + ,110.4 + ,112.1 + ,90 + ,113 + ,99.2 + ,114.2 + ,84 + ,108.4 + ,130.5 + ,121.1 + ,86 + ,105.4 + ,136.2 + ,131.6 + ,70 + ,102 + ,129.7 + ,125 + ,67 + ,102.8 + ,128 + ,120.4 + ,60 + ,103.4 + ,121.6 + ,117.7 + ,62 + ,101.6 + ,135.8 + ,117.5 + ,61 + ,98.6 + ,143.8 + ,120.6 + ,54 + ,98 + ,147.5 + ,127.5 + ,50 + ,93.8 + ,136.2 + ,112.3 + ,45 + ,95.6 + ,156.6 + ,124.5 + ,34 + ,105.6 + ,123.3 + ,115.2 + ,37 + ,106.8 + ,104.5 + ,104.7 + ,44 + ,103.6 + ,139.8 + ,130.9 + ,34 + ,101.2 + ,136.5 + ,129.2 + ,37 + ,100.4 + ,112.1 + ,113.5 + ,31 + ,103.2 + ,118.5 + ,125.6 + ,31 + ,105.6 + ,94.4 + ,107.6 + ,28 + ,106.6 + ,102.3 + ,107 + ,31 + ,107.2 + ,111.4 + ,121.6 + ,33 + ,107.4 + ,99.2 + ,110.7 + ,36 + ,104.8 + ,87.8 + ,106.3 + ,39 + ,107.2 + ,115.8 + ,118.6 + ,42 + ,117.4 + ,79.7 + ,104.6) + ,dim=c(4 + ,60) + ,dimnames=list(c('Consvert' + ,'werkl' + ,'investg' + ,'consg ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Consvert','werkl','investg','consg '),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/1n8k91258107705.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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 = 1.3661, p-value = 0.1719 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1221832 > 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/2nbqt1258107705.tab") > > system("convert tmp/1n8k91258107705.ps tmp/1n8k91258107705.png") > > > proc.time() user system elapsed 0.497 0.210 0.570