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(109.87 + ,103.5 + ,104.9 + ,115.7 + ,95.74 + ,102.8 + ,105.2 + ,115.2 + ,123.06 + ,118.72 + ,105.5 + ,115.1 + ,123.39 + ,119.01 + ,105.7 + ,115.4 + ,120.28 + ,118.61 + ,105.9 + ,115.5 + ,115.33 + ,120.43 + ,106.2 + ,115.1 + ,110.4 + ,111.83 + ,106.5 + ,114.6 + ,114.49 + ,116.79 + ,106.8 + ,114.5 + ,132.03 + ,131.71 + ,107 + ,114.4 + ,123.16 + ,120.57 + ,107.2 + ,113.9 + ,118.82 + ,117.83 + ,107.6 + ,113.1 + ,128.32 + ,130.8 + ,107.9 + ,112.6 + ,112.24 + ,107.46 + ,108.2 + ,112.6 + ,104.53 + ,112.09 + ,108.4 + ,112.7 + ,132.57 + ,129.47 + ,108.8 + ,112.5 + ,122.52 + ,119.72 + ,109.3 + ,112.2 + ,131.8 + ,134.81 + ,110.1 + ,112 + ,124.55 + ,135.8 + ,110.9 + ,119.4 + ,120.96 + ,129.27 + ,111.7 + ,119.3 + ,122.6 + ,126.94 + ,112.5 + ,119.3 + ,145.52 + ,153.45 + ,113.4 + ,119.2 + ,118.57 + ,121.86 + ,114.2 + ,118.7 + ,134.25 + ,133.47 + ,114.9 + ,118 + ,136.7 + ,135.34 + ,115.5 + ,117.5 + ,121.37 + ,117.1 + ,116.3 + ,117.7 + ,111.63 + ,120.65 + ,117.3 + ,118.4 + ,134.42 + ,132.49 + ,118.4 + ,119 + ,137.65 + ,137.6 + ,119.5 + ,119.3 + ,137.86 + ,138.69 + ,120.5 + ,119.5 + ,119.77 + ,125.53 + ,121.4 + ,119.8 + ,130.69 + ,133.09 + ,122.1 + ,120 + ,128.28 + ,129.08 + ,123 + ,120 + ,147.45 + ,145.94 + ,123.9 + ,120.1 + ,128.42 + ,129.07 + ,124.7 + ,120.6 + ,136.9 + ,139.69 + ,125.4 + ,121.2 + ,143.95 + ,142.09 + ,125.9 + ,121.6 + ,135.64 + ,137.29 + ,126.2 + ,121.6 + ,122.48 + ,127.03 + ,126.6 + ,121.3 + ,136.83 + ,137.25 + ,127.1 + ,121 + ,153.04 + ,156.87 + ,127.5 + ,120.8 + ,142.71 + ,150.89 + ,127.7 + ,121 + ,123.46 + ,139.14 + ,127.7 + ,121.5 + ,144.37 + ,158.3 + ,127.5 + ,121.8 + ,146.15 + ,149 + ,127 + ,121.7 + ,147.61 + ,158.36 + ,126.3 + ,121.3 + ,158.51 + ,168.06 + ,125.7 + ,120.7 + ,147.4 + ,153.38 + ,125.1 + ,120 + ,165.05 + ,173.86 + ,124.4 + ,119.3 + ,154.64 + ,162.47 + ,123.5 + ,118.5 + ,126.2 + ,145.17 + ,122.4 + ,117.7 + ,157.36 + ,168.89 + ,121 + ,117.1 + ,154.15 + ,166.64 + ,119.6 + ,116.6 + ,123.21 + ,140.07 + ,118.2 + ,116 + ,113.07 + ,128.84 + ,117.1 + ,115.2 + ,110.45 + ,123.41 + ,116.3 + ,114.4 + ,113.57 + ,120.3 + ,115.4 + ,113.9 + ,122.44 + ,129.67 + ,114.7 + ,113.5 + ,114.93 + ,118.1 + ,114 + ,113.1 + ,111.85 + ,113.91 + ,113.4 + ,112.8 + ,126.04 + ,131.09 + ,112.7 + ,112.6 + ,121.34 + ,119.15 + ,112.1 + ,112.3) + ,dim=c(4 + ,61) + ,dimnames=list(c('Uitvoer' + ,'Invoer' + ,'Invgdn' + ,'Consgdn') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('Uitvoer','Invoer','Invgdn','Consgdn'),1:61)) > 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/11eg71258146735.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=8.3333333333333) > 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.6872, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7628415 > 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/2qbiy1258146735.tab") > > system("convert tmp/11eg71258146735.ps tmp/11eg71258146735.png") > > > proc.time() user system elapsed 0.501 0.210 0.574