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.84 + ,153.4 + ,-6 + ,611 + ,99.505 + ,145 + ,-7 + ,594 + ,100.17 + ,137.7 + ,-6 + ,595 + ,100.83 + ,148.3 + ,-6 + ,591 + ,101.51 + ,152.2 + ,-3 + ,589 + ,102.16 + ,169.4 + ,-2 + ,584 + ,102.39 + ,168.6 + ,-5 + ,573 + ,102.54 + ,161.1 + ,-11 + ,567 + ,102.85 + ,174.1 + ,-11 + ,569 + ,103.47 + ,179 + ,-11 + ,621 + ,103.57 + ,190.6 + ,-10 + ,629 + ,103.69 + ,190 + ,-14 + ,628 + ,103.5 + ,181.6 + ,-8 + ,612 + ,103.47 + ,174.8 + ,-9 + ,595 + ,103.45 + ,180.5 + ,-5 + ,597 + ,103.48 + ,196.8 + ,-1 + ,593 + ,103.93 + ,193.8 + ,-2 + ,590 + ,103.89 + ,197 + ,-5 + ,580 + ,104.4 + ,216.3 + ,-4 + ,574 + ,104.79 + ,221.4 + ,-6 + ,573 + ,104.77 + ,217.9 + ,-2 + ,573 + ,105.13 + ,229.7 + ,-2 + ,620 + ,105.26 + ,227.4 + ,-2 + ,626 + ,104.96 + ,204.2 + ,-2 + ,620 + ,104.75 + ,196.6 + ,2 + ,588 + ,105.01 + ,198.8 + ,1 + ,566 + ,105.15 + ,207.5 + ,-8 + ,557 + ,105.2 + ,190.7 + ,-1 + ,561 + ,105.77 + ,201.6 + ,1 + ,549 + ,105.78 + ,210.5 + ,-1 + ,532 + ,106.26 + ,223.5 + ,2 + ,526 + ,106.13 + ,223.8 + ,2 + ,511 + ,106.12 + ,231.2 + ,1 + ,499 + ,106.57 + ,244 + ,-1 + ,555 + ,106.44 + ,234.7 + ,-2 + ,565 + ,106.54 + ,250.2 + ,-2 + ,542 + ,107.1 + ,265.7 + ,-1 + ,527 + ,108.1 + ,287.6 + ,-8 + ,510 + ,108.4 + ,283.3 + ,-4 + ,514 + ,108.84 + ,295.4 + ,-6 + ,517 + ,109.62 + ,312.3 + ,-3 + ,508 + ,110.42 + ,333.8 + ,-3 + ,493 + ,110.67 + ,347.7 + ,-7 + ,490 + ,111.66 + ,383.2 + ,-9 + ,469 + ,112.28 + ,407.1 + ,-11 + ,478 + ,112.87 + ,413.6 + ,-13 + ,528 + ,112.18 + ,362.7 + ,-11 + ,534 + ,112.36 + ,321.9 + ,-9 + ,518 + ,112.16 + ,239.4 + ,-17 + ,506 + ,111.49 + ,191 + ,-22 + ,502 + ,111.25 + ,159.7 + ,-25 + ,516 + ,111.36 + ,163.4 + ,-20 + ,528 + ,111.74 + ,157.6 + ,-24 + ,533 + ,111.1 + ,166.2 + ,-24 + ,536 + ,111.33 + ,176.7 + ,-22 + ,537 + ,111.25 + ,198.3 + ,-19 + ,524 + ,111.04 + ,226.2 + ,-18 + ,536 + ,110.97 + ,216.2 + ,-17 + ,587 + ,111.31 + ,235.9 + ,-11 + ,597 + ,111.02 + ,226.9 + ,-11 + ,581) + ,dim=c(4 + ,60) + ,dimnames=list(c('cpr' + ,'grst' + ,'cver' + ,'werkl') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('cpr','grst','cver','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/1sjdk1258119601.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.1231, p-value = 9.18e-10 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5426796 > 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/2qjbo1258119601.tab") > > system("convert tmp/1sjdk1258119601.ps tmp/1sjdk1258119601.png") > > > proc.time() user system elapsed 0.514 0.216 0.596