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(98.71 + ,153.4 + ,-6 + ,611 + ,98.54 + ,145 + ,-7 + ,594 + ,98.2 + ,137.7 + ,-6 + ,595 + ,96.92 + ,148.3 + ,-6 + ,591 + ,99.06 + ,152.2 + ,-3 + ,589 + ,99.65 + ,169.4 + ,-2 + ,584 + ,99.82 + ,168.6 + ,-5 + ,573 + ,99.99 + ,161.1 + ,-11 + ,567 + ,100.33 + ,174.1 + ,-11 + ,569 + ,99.31 + ,179 + ,-11 + ,621 + ,101.1 + ,190.6 + ,-10 + ,629 + ,101.1 + ,190 + ,-14 + ,628 + ,100.93 + ,181.6 + ,-8 + ,612 + ,100.85 + ,174.8 + ,-9 + ,595 + ,100.93 + ,180.5 + ,-5 + ,597 + ,99.6 + ,196.8 + ,-1 + ,593 + ,101.88 + ,193.8 + ,-2 + ,590 + ,101.81 + ,197 + ,-5 + ,580 + ,102.38 + ,216.3 + ,-4 + ,574 + ,102.74 + ,221.4 + ,-6 + ,573 + ,102.82 + ,217.9 + ,-2 + ,573 + ,101.72 + ,229.7 + ,-2 + ,620 + ,103.47 + ,227.4 + ,-2 + ,626 + ,102.98 + ,204.2 + ,-2 + ,620 + ,102.68 + ,196.6 + ,2 + ,588 + ,102.9 + ,198.8 + ,1 + ,566 + ,103.03 + ,207.5 + ,-8 + ,557 + ,101.29 + ,190.7 + ,-1 + ,561 + ,103.69 + ,201.6 + ,1 + ,549 + ,103.68 + ,210.5 + ,-1 + ,532 + ,104.2 + ,223.5 + ,2 + ,526 + ,104.08 + ,223.8 + ,2 + ,511 + ,104.16 + ,231.2 + ,1 + ,499 + ,103.05 + ,244 + ,-1 + ,555 + ,104.66 + ,234.7 + ,-2 + ,565 + ,104.46 + ,250.2 + ,-2 + ,542 + ,104.95 + ,265.7 + ,-1 + ,527 + ,105.85 + ,287.6 + ,-8 + ,510 + ,106.23 + ,283.3 + ,-4 + ,514 + ,104.86 + ,295.4 + ,-6 + ,517 + ,107.44 + ,312.3 + ,-3 + ,508 + ,108.23 + ,333.8 + ,-3 + ,493 + ,108.45 + ,347.7 + ,-7 + ,490 + ,109.39 + ,383.2 + ,-9 + ,469 + ,110.15 + ,407.1 + ,-11 + ,478 + ,109.13 + ,413.6 + ,-13 + ,528 + ,110.28 + ,362.7 + ,-11 + ,534 + ,110.17 + ,321.9 + ,-9 + ,518 + ,109.99 + ,239.4 + ,-17 + ,506 + ,109.26 + ,191 + ,-22 + ,502 + ,109.11 + ,159.7 + ,-25 + ,516 + ,107.06 + ,163.4 + ,-20 + ,528 + ,109.53 + ,157.6 + ,-24 + ,533 + ,108.92 + ,166.2 + ,-24 + ,536 + ,109.24 + ,176.7 + ,-22 + ,537 + ,109.12 + ,198.3 + ,-19 + ,524 + ,109 + ,226.2 + ,-18 + ,536 + ,107.23 + ,216.2 + ,-17 + ,587 + ,109.49 + ,235.9 + ,-11 + ,597 + ,109.04 + ,226.9 + ,-11 + ,581) + ,dim=c(4 + ,60) + ,dimnames=list(c('cpr' + ,'grst' + ,'cvert' + ,'werkl') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('cpr','grst','cvert','werkl'),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/14ehb1258119706.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 = 6.0338, p-value = 1.602e-09 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5347655 > 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/2pin41258119706.tab") > > system("convert tmp/14ehb1258119706.ps tmp/14ehb1258119706.png") > > > proc.time() user system elapsed 0.536 0.217 0.983