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 + ,105.63 + ,112.22 + ,116.76 + ,101.9299478 + ,105.63 + ,114.44 + ,113.45 + ,108.8496656 + ,107.04 + ,113.33 + ,84.46 + ,113.0912755 + ,108.45 + ,106.67 + ,100.67 + ,108.9595994 + ,108.45 + ,102.22 + ,105.66 + ,64.04250771 + ,111.27 + ,103.33 + ,96.47 + ,178.8011116 + ,114.08 + ,104.44 + ,91.11 + ,167.8168993 + ,115.49 + ,104.44 + ,116.29 + ,200.1404709 + ,115.49 + ,102.22 + ,116.27 + ,157.4800745 + ,115.49 + ,100.00 + ,102.25 + ,156.1822457 + ,111.27 + ,100.00 + ,123.80 + ,142.428314 + ,102.82 + ,100.00 + ,99.49 + ,109.0298348 + ,97.18 + ,108.89 + ,108.93 + ,101.5451797 + ,94.37 + ,111.11 + ,113.17 + ,107.4693865 + ,94.37 + ,108.89 + ,93.71 + ,127.2421901 + ,97.18 + ,103.33 + ,95.98 + ,106.467768 + ,98.59 + ,100.00 + ,101.66 + ,64.76929184 + ,100.00 + ,100.00 + ,107.51 + ,171.3927993 + ,101.41 + ,101.11 + ,84.11 + ,150.3374355 + ,100.00 + ,101.11 + ,93.83 + ,182.3770116 + ,97.18 + ,101.11 + ,96.08 + ,146.8928451 + ,98.59 + ,102.22 + ,85.60 + ,144.9659511 + ,95.77 + ,97.78 + ,103.79 + ,154.2034385 + ,90.14 + ,92.22 + ,85.31 + ,122.3287629 + ,94.37 + ,93.33 + ,83.61 + ,104.2813082 + ,92.96 + ,90.00 + ,103.53 + ,112.5599292 + ,90.14 + ,85.56 + ,87.24 + ,141.5580053 + ,88.73 + ,87.78 + ,92.88 + ,111.6957279 + ,87.32 + ,87.78 + ,77.28 + ,72.89828076 + ,91.55 + ,88.89 + ,112.11 + ,174.9045714 + ,95.77 + ,87.78 + ,86.16 + ,172.1959263 + ,95.77 + ,84.44 + ,77.70 + ,176.0680368 + ,90.14 + ,78.89 + ,89.15 + ,190.2464348 + ,85.92 + ,75.56 + ,97.91 + ,149.4152136 + ,81.69 + ,72.22 + ,89.45 + ,156.2524811 + ,85.92 + ,76.67 + ,92.70 + ,121.0370416 + ,101.41 + ,91.11 + ,83.30 + ,101.4230311 + ,102.82 + ,96.67 + ,97.26 + ,116.4289859 + ,97.18 + ,92.22 + ,79.41 + ,132.1983693 + ,85.92 + ,87.78 + ,76.95 + ,93.44367423 + ,81.69 + ,83.33 + ,89.37 + ,67.04736312 + ,87.32 + ,86.67 + ,81.60 + ,146.6790851 + ,100.00 + ,92.22 + ,83.18 + ,140.9228326 + ,108.45 + ,93.33 + ,97.14 + ,154.9332763 + ,111.27 + ,91.11 + ,64.17 + ,146.926436 + ,108.45 + ,85.56 + ,72.73 + ,117.2321129 + ,104.23 + ,80.00 + ,79.18 + ,134.7054692 + ,105.63 + ,81.11 + ,84.76 + ,110.8101505 + ,112.68 + ,90.00 + ,78.37 + ,92.62833237 + ,114.08 + ,94.44 + ,84.95 + ,92.53061349) + ,dim=c(4 + ,51) + ,dimnames=list(c('WM' + ,'WV' + ,'Bouwv' + ,'Inspw') + ,1:51)) > y <- array(NA,dim=c(4,51),dimnames=list(c('WM','WV','Bouwv','Inspw'),1:51)) > 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/14t041258719421.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.75, p-value = 0.0001768 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3727734 > 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/2ogqa1258719421.tab") > > system("convert tmp/14t041258719421.ps tmp/14t041258719421.png") > > > proc.time() user system elapsed 0.493 0.211 0.552