R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(89.1 + ,19 + ,96.96 + ,98.13 + ,83.3 + ,22 + ,93.11 + ,98.29 + ,97.7 + ,19 + ,95.62 + ,99.1 + ,100.9 + ,13 + ,98.30 + ,99.26 + ,108.3 + ,12 + ,96.38 + ,98.85 + ,113.2 + ,8 + ,100.82 + ,98.05 + ,105 + ,16 + ,99.06 + ,98.53 + ,104 + ,19 + ,94.03 + ,99.34 + ,109.8 + ,19 + ,102.07 + ,100.14 + ,98.6 + ,24 + ,99.31 + ,100.3 + ,93.5 + ,20 + ,98.64 + ,100.22 + ,98.2 + ,14 + ,101.82 + ,99.9 + ,88 + ,18 + ,99.14 + ,99.58 + ,85.3 + ,14 + ,97.63 + ,99.9 + ,96.8 + ,13 + ,100.06 + ,100.78 + ,98.8 + ,15 + ,101.32 + ,100.78 + ,110.3 + ,19 + ,101.49 + ,100.46 + ,111.6 + ,22 + ,105.43 + ,100.06 + ,111.2 + ,28 + ,105.09 + ,100.28 + ,106.9 + ,28 + ,99.48 + ,100.78 + ,117.6 + ,32 + ,108.53 + ,101.58 + ,97 + ,34 + ,104.34 + ,102.06 + ,97.3 + ,38 + ,106.10 + ,102.02 + ,98.4 + ,44 + ,107.35 + ,101.68 + ,87.6 + ,43 + ,103.00 + ,101.32 + ,87.4 + ,45 + ,104.50 + ,101.81 + ,94.7 + ,48 + ,105.17 + ,102.3 + ,101.5 + ,45 + ,104.84 + ,102.12 + ,110.4 + ,43 + ,106.18 + ,102.1 + ,108.4 + ,46 + ,108.86 + ,101.75 + ,109.7 + ,55 + ,107.77 + ,101.5 + ,105.2 + ,52 + ,102.74 + ,102.16 + ,111.1 + ,51 + ,112.63 + ,103.47 + ,96.2 + ,52 + ,106.26 + ,104.05 + ,97.3 + ,54 + ,108.86 + ,104.09 + ,98.9 + ,58 + ,111.38 + ,103.55 + ,91.7 + ,55 + ,106.85 + ,102.77 + ,90.9 + ,56 + ,107.86 + ,102.89 + ,98.8 + ,39 + ,107.94 + ,103.6 + ,111.5 + ,35 + ,111.38 + ,103.76 + ,119 + ,34 + ,111.29 + ,103.92 + ,115.3 + ,35 + ,113.72 + ,103.35 + ,116.3 + ,38 + ,111.88 + ,103.32 + ,113.6 + ,31 + ,109.87 + ,104.2 + ,115.1 + ,31 + ,113.72 + ,105.44 + ,109.7 + ,28 + ,111.71 + ,105.81 + ,97.6 + ,24 + ,114.81 + ,106.25 + ,100.8 + ,21 + ,112.05 + ,105.94 + ,94 + ,10 + ,111.54 + ,105.82 + ,87.2 + ,14 + ,110.87 + ,105.96 + ,102.9 + ,18 + ,110.87 + ,106.49 + ,111.3 + ,9 + ,115.48 + ,106.32 + ,106.6 + ,7 + ,111.63 + ,105.88 + ,108.9 + ,9 + ,116.24 + ,105.07 + ,108.3 + ,13 + ,113.56 + ,105.12 + ,100.5 + ,11 + ,106.01 + ,106.15 + ,104 + ,7 + ,110.45 + ,107.38 + ,89.9 + ,13 + ,107.77 + ,107.75 + ,86.8 + ,18 + ,108.61 + ,107.87 + ,91.2 + ,17 + ,108.19 + ,107.39) + ,dim=c(4 + ,60) + ,dimnames=list(c('Ind' + ,'Consve' + ,'Best' + ,'HICP') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Ind','Consve','Best','HICP'),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/freestat/rcomp/tmp/1urp31258038504.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 0.2171, p-value = 0.8281 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.01944049 > 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/freestat/rcomp/tmp/20dz21258038504.tab") > system("convert tmp/1urp31258038504.ps tmp/1urp31258038504.png") > > > proc.time() user system elapsed 0.734 0.305 0.816