R version 2.8.0 (2008-10-20) 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(93.0 + ,72.5 + ,95.9 + ,99.3 + ,99.2 + ,72.0 + ,95.3 + ,98.7 + ,112.2 + ,98.8 + ,100.4 + ,107.9 + ,112.1 + ,75.2 + ,97.3 + ,101.0 + ,103.3 + ,81.2 + ,82.3 + ,97.6 + ,108.2 + ,88.0 + ,97.0 + ,103.0 + ,90.4 + ,54.6 + ,93.5 + ,94.1 + ,72.8 + ,68.6 + ,90.9 + ,94.1 + ,111.0 + ,101.5 + ,107.8 + ,115.1 + ,117.9 + ,93.4 + ,110.9 + ,116.5 + ,111.3 + ,84.5 + ,98.1 + ,103.4 + ,110.5 + ,91.4 + ,106.5 + ,112.5 + ,94.8 + ,64.5 + ,93.4 + ,95.6 + ,100.4 + ,64.5 + ,95.7 + ,97.5 + ,132.1 + ,117.3 + ,109.0 + ,119.3 + ,114.6 + ,73.5 + ,97.6 + ,100.9 + ,101.9 + ,79.7 + ,92.7 + ,97.7 + ,130.2 + ,102.6 + ,107.5 + ,115.3 + ,84.0 + ,57.9 + ,91.7 + ,92.8 + ,86.4 + ,73.1 + ,95.7 + ,99.2 + ,122.3 + ,102.4 + ,111.4 + ,118.7 + ,120.9 + ,82.3 + ,106.0 + ,110.1 + ,110.2 + ,89.1 + ,104.8 + ,110.3 + ,112.6 + ,84.7 + ,108.7 + ,112.9 + ,102.0 + ,81.4 + ,97.3 + ,102.2 + ,105.0 + ,67.5 + ,97.1 + ,99.4 + ,130.5 + ,113.9 + ,106.1 + ,116.1 + ,115.5 + ,83.8 + ,98.6 + ,103.8 + ,103.7 + ,73.9 + ,98.5 + ,101.8 + ,130.9 + ,103.9 + ,105.5 + ,113.7 + ,89.1 + ,67.9 + ,86.2 + ,89.7 + ,93.8 + ,62.5 + ,98.3 + ,99.5 + ,123.8 + ,125.4 + ,111.3 + ,122.9 + ,111.9 + ,79.1 + ,105.0 + ,108.6 + ,118.3 + ,106.3 + ,105.7 + ,114.4 + ,116.9 + ,96.2 + ,103.5 + ,110.5 + ,103.6 + ,94.3 + ,96.9 + ,104.1 + ,116.6 + ,85.6 + ,98.1 + ,103.6 + ,141.3 + ,117.4 + ,111.7 + ,121.6 + ,107.0 + ,88.5 + ,94.7 + ,101.1 + ,125.2 + ,124.2 + ,104.2 + ,116.0 + ,136.4 + ,119.3 + ,109.7 + ,120.1 + ,91.6 + ,76.8 + ,91.3 + ,96.0 + ,95.3 + ,70.6 + ,102.6 + ,105.0 + ,132.3 + ,122.1 + ,114.2 + ,124.7 + ,130.6 + ,109.5 + ,115.8 + ,123.9 + ,131.9 + ,119.9 + ,113.5 + ,123.6 + ,118.6 + ,102.3 + ,107.1 + ,114.8 + ,114.3 + ,79.6 + ,104.5 + ,108.8 + ,111.3 + ,78.2 + ,101.9 + ,106.1 + ,126.5 + ,103.6 + ,116.0 + ,123.2 + ,112.1 + ,77.8 + ,102.0 + ,106.2 + ,119.3 + ,99.1 + ,108.1 + ,115.2 + ,142.4 + ,105.7 + ,112.9 + ,120.6 + ,101.1 + ,84.1 + ,104.5 + ,109.5 + ,97.4 + ,88.7 + ,109.1 + ,114.4 + ,129.1 + ,108.0 + ,113.4 + ,121.4 + ,136.9 + ,98.1 + ,123.9 + ,129.5 + ,129.8 + ,101.0 + ,117.7 + ,124.3 + ,123.9 + ,82.0 + ,108.3 + ,112.6) + ,dim=c(4 + ,60) + ,dimnames=list(c('INV' + ,'DC' + ,'NDC' + ,'CON') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('INV','DC','NDC','CON'),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/freestat/rcomp/tmp/1pugt1229611496.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 7.2139, p-value = 5.438e-13 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.639525 > 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/freestat/rcomp/tmp/22jhe1229611496.tab") > > system("convert tmp/1pugt1229611496.ps tmp/1pugt1229611496.png") > > > proc.time() user system elapsed 0.687 0.283 0.758