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 + ,108.16 + ,211.30 + ,99.95 + ,99.97 + ,114.02 + ,333.91 + ,102.07 + ,101.03 + ,102.19 + ,187.83 + ,102.02 + ,101.00 + ,110.37 + ,254.78 + ,102.63 + ,101.30 + ,96.86 + ,121.74 + ,102.88 + ,101.43 + ,94.19 + ,113.91 + ,103.01 + ,101.49 + ,99.52 + ,140.87 + ,104.33 + ,102.14 + ,94.06 + ,142.61 + ,105.21 + ,102.58 + ,97.55 + ,173.91 + ,104.73 + ,102.34 + ,78.15 + ,121.74 + ,104.17 + ,102.07 + ,81.24 + ,113.91 + ,103.69 + ,101.83 + ,92.36 + ,115.65 + ,104.33 + ,102.14 + ,96.06 + ,155.65 + ,105.21 + ,102.58 + ,114.05 + ,256.52 + ,105.31 + ,102.63 + ,110.66 + ,217.39 + ,105.54 + ,102.74 + ,104.92 + ,230.43 + ,106.70 + ,103.32 + ,90.00 + ,171.30 + ,106.60 + ,103.27 + ,95.70 + ,155.65 + ,105.01 + ,102.48 + ,86.03 + ,133.04 + ,104.33 + ,102.14 + ,84.85 + ,140.87 + ,104.17 + ,102.07 + ,100.04 + ,169.57 + ,103.42 + ,101.69 + ,80.92 + ,183.48 + ,102.33 + ,101.15 + ,74.07 + ,173.91 + ,101.82 + ,100.90 + ,77.30 + ,176.52 + ,103.57 + ,101.77 + ,97.23 + ,176.52 + ,103.90 + ,101.93 + ,90.76 + ,306.96 + ,104.58 + ,102.27 + ,100.56 + ,247.83 + ,105.03 + ,102.49 + ,92.01 + ,171.30 + ,105.67 + ,102.80 + ,99.24 + ,140.87 + ,105.69 + ,102.82 + ,105.87 + ,171.30 + ,105.72 + ,102.83 + ,90.99 + ,153.04 + ,105.84 + ,102.89 + ,93.31 + ,184.35 + ,105.79 + ,102.87 + ,91.17 + ,236.52 + ,105.39 + ,102.67 + ,77.33 + ,177.39 + ,105.97 + ,102.96 + ,91.13 + ,164.35 + ,106.50 + ,103.22 + ,85.01 + ,208.70 + ,107.13 + ,103.53 + ,83.90 + ,211.30 + ,109.36 + ,104.63 + ,104.86 + ,403.48 + ,109.36 + ,104.63 + ,110.90 + ,328.70 + ,108.42 + ,104.17 + ,95.44 + ,261.74 + ,107.94 + ,103.93 + ,111.62 + ,254.78 + ,108.10 + ,104.01 + ,108.89 + ,277.39 + ,108.40 + ,104.16 + ,96.18 + ,282.61 + ,110.55 + ,105.22 + ,101.97 + ,357.39 + ,111.81 + ,105.85 + ,99.12 + ,284.35 + ,112.55 + ,106.21 + ,86.78 + ,183.48 + ,111.66 + ,105.77 + ,118.42 + ,186.09 + ,111.38 + ,105.63 + ,118.74 + ,179.13 + ,113.10 + ,106.49 + ,106.53 + ,175.65 + ,115.18 + ,107.51 + ,134.78 + ,317.39 + ,121.07 + ,110.43 + ,104.68 + ,375.65 + ,123.07 + ,111.42 + ,105.30 + ,277.39 + ,123.40 + ,111.58 + ,139.41 + ,313.91 + ,122.92 + ,111.34 + ,103.61 + ,203.48 + ,122.39 + ,111.08 + ,99.78 + ,199.13 + ,123.55 + ,111.66 + ,103.46 + ,240.87 + ,124.97 + ,112.36 + ,120.06 + ,238.26 + ,124.87 + ,112.31 + ,96.71 + ,258.26 + ,123.27 + ,111.52 + ,107.13 + ,335.65 + ,121.96 + ,110.87 + ,105.36 + ,302.61 + ,122.49 + ,111.13 + ,111.69 + ,373.91 + ,125.68 + ,112.71 + ,132.05 + ,570.43 + ,126.76 + ,113.25 + ,126.80 + ,382.61 + ,126.44 + ,113.09 + ,154.48 + ,307.83 + ,125.35 + ,112.55 + ,141.56 + ,435.65 + ,126.01 + ,112.87 + ,109.95 + ,306.09 + ,127.45 + ,113.59 + ,127.90 + ,250.43 + ,130.58 + ,115.14 + ,133.09 + ,350.43 + ,133.09 + ,116.38 + ,120.08 + ,426.09 + ,133.34 + ,116.50 + ,117.56 + ,477.39 + ,132.84 + ,116.25 + ,143.04 + ,437.39 + ,133.80 + ,116.73) + ,dim=c(4 + ,72) + ,dimnames=list(c('BV' + ,'HK' + ,'BN' + ,'VI') + ,1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('BV','HK','BN','VI'),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: 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/12z3u1257860618.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 = 5.8006, p-value = 6.608e-09 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4681205 > 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/2elqg1257860618.tab") > > system("convert tmp/12z3u1257860618.ps tmp/12z3u1257860618.png") > > > proc.time() user system elapsed 0.538 0.213 0.631