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.00 + ,100.00 + ,100.00 + ,100.00 + ,105.26 + ,106.73 + ,94.97 + ,110.76 + ,106.58 + ,104.81 + ,107.50 + ,130.55 + ,101.32 + ,96.15 + ,124.27 + ,126.20 + ,98.68 + ,88.46 + ,107.06 + ,118.88 + ,100.00 + ,88.46 + ,79.71 + ,116.25 + ,102.63 + ,91.35 + ,163.41 + ,108.24 + ,102.63 + ,92.31 + ,144.83 + ,109.73 + ,102.63 + ,91.35 + ,166.82 + ,119.79 + ,98.68 + ,87.50 + ,154.26 + ,117.62 + ,98.68 + ,85.58 + ,132.60 + ,112.24 + ,93.42 + ,86.54 + ,157.51 + ,130.32 + ,98.68 + ,97.12 + ,104.02 + ,92.56 + ,98.68 + ,99.04 + ,106.03 + ,109.50 + ,100.00 + ,98.08 + ,113.23 + ,129.52 + ,101.32 + ,92.31 + ,117.64 + ,121.17 + ,101.32 + ,88.46 + ,113.34 + ,124.49 + ,103.95 + ,89.42 + ,66.62 + ,117.05 + ,106.58 + ,90.38 + ,185.99 + ,113.27 + ,107.89 + ,90.38 + ,174.57 + ,115.22 + ,107.89 + ,88.46 + ,208.19 + ,132.15 + ,107.89 + ,86.54 + ,163.81 + ,115.22 + ,103.95 + ,86.54 + ,162.46 + ,125.74 + ,96.05 + ,86.54 + ,148.16 + ,131.12 + ,90.79 + ,94.23 + ,113.41 + ,97.71 + ,86.84 + ,96.15 + ,105.63 + ,114.99 + ,88.16 + ,94.23 + ,111.79 + ,131.35 + ,90.79 + ,89.42 + ,132.36 + ,133.30 + ,92.11 + ,86.54 + ,110.75 + ,129.18 + ,93.42 + ,86.54 + ,67.37 + ,116.70 + ,94.74 + ,87.50 + ,178.29 + ,121.28 + ,93.42 + ,87.50 + ,156.38 + ,120.48 + ,90.79 + ,87.50 + ,189.71 + ,135.93 + ,92.11 + ,88.46 + ,152.80 + ,121.40 + ,89.47 + ,84.62 + ,150.80 + ,125.06 + ,84.21 + ,79.81 + ,160.40 + ,134.10 + ,88.16 + ,80.77 + ,127.25 + ,105.84 + ,86.84 + ,77.88 + ,108.47 + ,119.22 + ,84.21 + ,74.04 + ,117.09 + ,128.72 + ,82.89 + ,75.96 + ,147.25 + ,140.05 + ,81.58 + ,75.96 + ,116.19 + ,129.63 + ,85.53 + ,76.92 + ,75.83 + ,114.42 + ,89.47 + ,75.96 + ,181.94 + ,126.66 + ,89.47 + ,73.08 + ,179.12 + ,129.06 + ,84.21 + ,68.27 + ,183.15 + ,125.63 + ,80.26 + ,65.38 + ,197.90 + ,134.21 + ,76.32 + ,62.50 + ,155.42 + ,124.83 + ,80.26 + ,66.35 + ,162.54 + ,132.61 + ,94.74 + ,78.85 + ,125.90 + ,109.84 + ,96.05 + ,83.65 + ,105.50 + ,114.19 + ,90.79 + ,79.81 + ,121.11 + ,133.64 + ,80.26 + ,75.96 + ,137.51 + ,132.38 + ,76.32 + ,72.12 + ,97.20 + ,113.73 + ,81.58 + ,75.00 + ,69.74 + ,107.89 + ,93.42 + ,79.81 + ,152.58 + ,104.12 + ,101.32 + ,80.77 + ,146.59 + ,106.64 + ,103.95 + ,78.85 + ,161.16 + ,117.96 + ,101.32 + ,74.04 + ,152.84 + ,107.67 + ,97.37 + ,69.23 + ,121.95 + ,105.03 + ,98.68 + ,70.19 + ,140.12 + ,117.51) + ,dim=c(4 + ,60) + ,dimnames=list(c('Wm' + ,'Wv' + ,'insch' + ,'eco') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Wm','Wv','insch','eco'),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/1y4391259014593.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 = 4.9472, p-value = 7.53e-07 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4513924 > 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/2eb8e1259014593.tab") > > system("convert tmp/1y4391259014593.ps tmp/1y4391259014593.png") > > > proc.time() user system elapsed 0.488 0.202 0.564