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(103.63 + ,107.47 + ,103.34 + ,100.30 + ,103.64 + ,107.99 + ,103.38 + ,98.50 + ,103.66 + ,108.36 + ,103.64 + ,95.10 + ,103.77 + ,108.61 + ,104.04 + ,93.10 + ,103.88 + ,108.80 + ,104.11 + ,92.20 + ,103.91 + ,109.05 + ,104.11 + ,89.00 + ,103.91 + ,109.12 + ,104.11 + ,86.40 + ,103.92 + ,109.28 + ,104.17 + ,84.50 + ,104.05 + ,110.00 + ,105.16 + ,82.70 + ,104.23 + ,110.78 + ,105.86 + ,80.80 + ,104.30 + ,110.84 + ,106.11 + ,81.80 + ,104.31 + ,110.83 + ,106.11 + ,81.80 + ,104.31 + ,111.38 + ,106.11 + ,82.90 + ,104.34 + ,112.78 + ,106.13 + ,83.80 + ,104.55 + ,113.56 + ,106.67 + ,86.20 + ,104.65 + ,113.60 + ,106.85 + ,86.10 + ,104.73 + ,113.72 + ,106.97 + ,86.20 + ,104.75 + ,113.73 + ,107.02 + ,88.80 + ,104.75 + ,113.82 + ,107.02 + ,89.60 + ,104.76 + ,113.85 + ,107.07 + ,87.80 + ,104.94 + ,113.96 + ,107.76 + ,88.30 + ,105.29 + ,114.24 + ,108.10 + ,88.60 + ,105.38 + ,114.36 + ,108.18 + ,91.00 + ,105.43 + ,114.44 + ,108.22 + ,91.50 + ,105.43 + ,114.91 + ,108.22 + ,95.40 + ,105.42 + ,115.76 + ,108.17 + ,98.70 + ,105.52 + ,115.91 + ,108.31 + ,99.90 + ,105.69 + ,116.01 + ,108.31 + ,98.60 + ,105.72 + ,116.01 + ,108.36 + ,100.30 + ,105.74 + ,116.15 + ,108.46 + ,100.20 + ,105.74 + ,116.17 + ,108.46 + ,100.40 + ,105.74 + ,116.20 + ,108.46 + ,101.40 + ,105.95 + ,116.32 + ,109.43 + ,103.00 + ,106.17 + ,116.68 + ,109.55 + ,109.10 + ,106.34 + ,116.74 + ,109.62 + ,111.40 + ,106.37 + ,116.86 + ,109.70 + ,114.10 + ,106.37 + ,117.57 + ,109.70 + ,121.80 + ,106.36 + ,118.07 + ,109.56 + ,127.60 + ,106.44 + ,118.56 + ,109.92 + ,129.90 + ,106.29 + ,118.70 + ,109.81 + ,128.00 + ,106.23 + ,118.76 + ,109.78 + ,123.50 + ,106.23 + ,118.88 + ,109.80 + ,124.00 + ,106.23 + ,118.98 + ,109.80 + ,127.40 + ,106.23 + ,119.30 + ,109.79 + ,127.60 + ,106.34 + ,118.95 + ,110.40 + ,128.40 + ,106.44 + ,119.06 + ,110.95 + ,131.40 + ,106.44 + ,119.34 + ,111.07 + ,135.10 + ,106.48 + ,119.37 + ,111.09 + ,134.00 + ,106.50 + ,119.60 + ,111.10 + ,144.50 + ,106.57 + ,120.14 + ,111.01 + ,147.30 + ,106.40 + ,121.25 + ,111.01 + ,150.90 + ,106.37 + ,121.61 + ,111.35 + ,148.70 + ,106.25 + ,122.01 + ,111.42 + ,141.40 + ,106.21 + ,121.77 + ,111.24 + ,138.90 + ,106.21 + ,122.26 + ,111.24 + ,139.80 + ,106.24 + ,122.13 + ,111.47 + ,145.60 + ,106.19 + ,122.11 + ,111.57 + ,147.90 + ,106.08 + ,122.40 + ,111.96 + ,148.50 + ,106.13 + ,122.59 + ,112.02 + ,151.10 + ,106.09 + ,122.67 + ,112.02 + ,157.50) + ,dim=c(4 + ,60) + ,dimnames=list(c('KLA' + ,'STO' + ,'SCH' + ,'TOTPR') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('KLA','STO','SCH','TOTPR'),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/1m8rm1257370129.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 = 8.4234, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7504385 > 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/204d21257370129.tab") > > system("convert tmp/1m8rm1257370129.ps tmp/1m8rm1257370129.png") > > > proc.time() user system elapsed 0.506 0.218 0.655