R version 2.8.1 (2008-12-22) 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(115.47 + ,111.69 + ,101.7 + ,98.25 + ,103.34 + ,100.5 + ,101.53 + ,98.66 + ,102.6 + ,106.29 + ,101.76 + ,98.38 + ,100.69 + ,101.09 + ,101.15 + ,97.92 + ,105.67 + ,104.53 + ,100.92 + ,98.88 + ,123.61 + ,122.74 + ,100.73 + ,100.43 + ,113.08 + ,109.84 + ,100.55 + ,100.95 + ,106.46 + ,101.99 + ,102.15 + ,102.7 + ,123.38 + ,125.12 + ,100.79 + ,101.32 + ,109.87 + ,103.5 + ,99.93 + ,101.92 + ,95.74 + ,102.8 + ,100.03 + ,102.35 + ,123.06 + ,118.72 + ,100.25 + ,103.05 + ,123.39 + ,119.01 + ,99.6 + ,104.57 + ,120.28 + ,118.61 + ,100.16 + ,102.95 + ,115.33 + ,120.43 + ,100.49 + ,102.4 + ,110.4 + ,111.83 + ,99.72 + ,104.39 + ,114.49 + ,116.79 + ,100.14 + ,106.16 + ,132.03 + ,131.71 + ,98.48 + ,108.17 + ,123.16 + ,120.57 + ,100.38 + ,107.77 + ,118.82 + ,117.83 + ,101.45 + ,108.06 + ,128.32 + ,130.8 + ,98.42 + ,106.95 + ,112.24 + ,107.46 + ,98.6 + ,108.18 + ,104.53 + ,112.09 + ,100.06 + ,108.86 + ,132.57 + ,129.47 + ,98.62 + ,109.72 + ,122.52 + ,119.72 + ,100.84 + ,111.25 + ,131.8 + ,134.81 + ,100.02 + ,110.04 + ,124.55 + ,135.8 + ,97.95 + ,109.64 + ,120.96 + ,129.27 + ,98.32 + ,113.22 + ,122.6 + ,126.94 + ,98.27 + ,113.52 + ,145.52 + ,153.45 + ,97.22 + ,115.15 + ,118.57 + ,121.86 + ,99.28 + ,112.85 + ,134.25 + ,133.47 + ,100.38 + ,112.88 + ,136.7 + ,135.34 + ,99.02 + ,113.35 + ,121.37 + ,117.1 + ,100.32 + ,114.43 + ,111.63 + ,120.65 + ,99.81 + ,115.58 + ,134.42 + ,132.49 + ,100.6 + ,113.21 + ,137.65 + ,137.6 + ,101.19 + ,112.94 + ,137.86 + ,138.69 + ,100.47 + ,114.04 + ,119.77 + ,125.53 + ,101.77 + ,113.36 + ,130.69 + ,133.09 + ,102.32 + ,114.88 + ,128.28 + ,129.08 + ,102.39 + ,114.61 + ,147.45 + ,145.94 + ,101.16 + ,115.93 + ,128.42 + ,129.07 + ,100.63 + ,117.61 + ,136.9 + ,139.69 + ,101.48 + ,115.99 + ,143.95 + ,142.09 + ,101.44 + ,116.83 + ,135.64 + ,137.29 + ,100.09 + ,118.27 + ,122.48 + ,127.03 + ,100.7 + ,117.13 + ,136.83 + ,137.25 + ,100.78 + ,118.25 + ,153.04 + ,156.87 + ,99.81 + ,117.84 + ,142.71 + ,150.89 + ,98.45 + ,118.62 + ,123.46 + ,139.14 + ,98.49 + ,118.46 + ,144.37 + ,158.3 + ,97.48 + ,120.47 + ,146.15 + ,149 + ,97.91 + ,121.01 + ,147.61 + ,158.36 + ,96.94 + ,121.3 + ,158.51 + ,168.06 + ,98.53 + ,121.91 + ,147.4 + ,153.38 + ,96.82 + ,121.7 + ,165.05 + ,173.86 + ,95.76 + ,124.22 + ,154.64 + ,162.47 + ,95.27 + ,125.49 + ,126.2 + ,145.17 + ,97.32 + ,125.41 + ,157.36 + ,168.89 + ,96.68 + ,125.59 + ,154.15 + ,166.64 + ,97.87 + ,124.37 + ,123.21 + ,140.07 + ,97.42 + ,121.77 + ,113.07 + ,128.84 + ,97.94 + ,117.38 + ,110.45 + ,123.41 + ,99.52 + ,118.13 + ,113.57 + ,120.3 + ,100.99 + ,116.96 + ,122.44 + ,129.67 + ,99.92 + ,116.01 + ,114.93 + ,118.1 + ,101.97 + ,114.63 + ,111.85 + ,113.91 + ,101.58 + ,114.74 + ,126.04 + ,131.09 + ,99.54 + ,113.41 + ,121.34 + ,119.15 + ,100.83 + ,117.02) + ,dim=c(4 + ,70) + ,dimnames=list(c('invoer' + ,'uitvoer' + ,'ruilvoet' + ,'eenheidswaarden') + ,1:70)) > y <- array(NA,dim=c(4,70),dimnames=list(c('invoer','uitvoer','ruilvoet','eenheidswaarden'),1:70)) > 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/rcomp/tmp/1d8al1258035455.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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 = 9.5766, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7821946 > 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/rcomp/tmp/2yp9t1258035455.tab") > > system("convert tmp/1d8al1258035455.ps tmp/1d8al1258035455.png") > > > proc.time() user system elapsed 0.540 0.370 0.806