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(139.72 + ,69.4 + ,68.56 + ,1.9 + ,139.91 + ,57.2 + ,68.65 + ,2.6 + ,139.97 + ,68 + ,68.68 + ,2.3 + ,139.98 + ,53.3 + ,68.69 + ,2.4 + ,140.03 + ,47.9 + ,68.71 + ,2.2 + ,140.03 + ,60.8 + ,68.71 + ,2 + ,140.26 + ,61.7 + ,68.82 + ,2.9 + ,142.15 + ,57.8 + ,69.75 + ,2.6 + ,143.54 + ,51.4 + ,70.43 + ,2.3 + ,144.5 + ,50.5 + ,70.91 + ,2.3 + ,145.65 + ,48.1 + ,71.47 + ,2.6 + ,146.47 + ,58.7 + ,71.87 + ,3.1 + ,147.36 + ,54 + ,72.31 + ,2.8 + ,147.89 + ,56.1 + ,72.56 + ,2.5 + ,149.23 + ,60.4 + ,73.23 + ,2.9 + ,149.93 + ,51.2 + ,73.57 + ,3.1 + ,150.24 + ,50.7 + ,73.72 + ,3.1 + ,150.15 + ,56.4 + ,73.68 + ,3.2 + ,150.31 + ,53.3 + ,73.76 + ,2.5 + ,150.31 + ,52.6 + ,73.76 + ,2.6 + ,150.37 + ,47.7 + ,73.78 + ,2.9 + ,107.59 + ,49.5 + ,73.97 + ,2.6 + ,107.59 + ,48.5 + ,73.97 + ,2.4 + ,107.59 + ,55.3 + ,73.97 + ,1.7 + ,107.59 + ,49.8 + ,73.97 + ,2 + ,107.59 + ,57.4 + ,73.97 + ,2.2 + ,107.58 + ,64.6 + ,73.97 + ,1.9 + ,108.28 + ,53 + ,73.96 + ,1.6 + ,109.71 + ,41.5 + ,74.44 + ,1.6 + ,110.21 + ,55.9 + ,75.43 + ,1.2 + ,110.27 + ,58.4 + ,75.77 + ,1.2 + ,110.32 + ,53.5 + ,75.82 + ,1.5 + ,110.33 + ,50.6 + ,75.85 + ,1.6 + ,110.33 + ,58.5 + ,75.85 + ,1.7 + ,113.38 + ,49.1 + ,75.85 + ,1.8 + ,119.37 + ,61.1 + ,77.95 + ,1.8 + ,123.37 + ,52.3 + ,82.07 + ,1.8 + ,123.75 + ,58.4 + ,84.82 + ,1.3 + ,124.13 + ,65.5 + ,85.08 + ,1.3 + ,124.59 + ,61.7 + ,85.34 + ,1.4 + ,124.59 + ,45.1 + ,85.65 + ,1.1 + ,124.68 + ,52.1 + ,85.65 + ,1.5 + ,124.7 + ,59.3 + ,85.72 + ,2.2 + ,124.7 + ,57.9 + ,85.73 + ,2.9 + ,124.7 + ,45 + ,85.73 + ,3.1 + ,124.7 + ,64.9 + ,85.73 + ,3.5 + ,124.71 + ,63.8 + ,85.73 + ,3.6 + ,125.55 + ,69.4 + ,85.74 + ,4.4 + ,127.41 + ,71.1 + ,86.32 + ,4.2 + ,127.73 + ,62.9 + ,87.59 + ,5.2 + ,127.8 + ,73.5 + ,87.81 + ,5.8 + ,127.91 + ,62.7 + ,87.87 + ,5.9 + ,127.94 + ,51.9 + ,87.94 + ,5.4 + ,128.01 + ,73.3 + ,87.96 + ,5.5 + ,128.01 + ,66.7 + ,88.01 + ,4.7 + ,128.01 + ,62.5 + ,88.01 + ,3.1 + ,128.01 + ,70.3 + ,88.01 + ,2.6 + ,128.01 + ,66.1 + ,88.01 + ,2.3 + ,128.86 + ,59.6 + ,88.01 + ,1.9 + ,124.74 + ,66.3 + ,88.59 + ,0.6) + ,dim=c(4 + ,60) + ,dimnames=list(c('icTab' + ,'ipTab' + ,'gemCP' + ,'infl') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('icTab','ipTab','gemCP','infl'),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/19sm91258160709.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 = 0.2043, p-value = 0.8381 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.01825492 > 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/2f4ve1258160709.tab") > > system("convert tmp/19sm91258160709.ps tmp/19sm91258160709.png") > > > proc.time() user system elapsed 0.492 0.204 0.851