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(101 + ,100.64 + ,102.86 + ,109 + ,100.88 + ,100.63 + ,102.55 + ,108.6 + ,100.55 + ,100.43 + ,102.28 + ,108.8 + ,100.83 + ,100.8 + ,102.26 + ,108.5 + ,101.51 + ,101.33 + ,102.57 + ,108.3 + ,102.16 + ,101.88 + ,103.08 + ,108.2 + ,102.39 + ,101.85 + ,102.76 + ,108 + ,102.54 + ,102.04 + ,102.51 + ,107.9 + ,102.85 + ,102.22 + ,102.87 + ,108 + ,103.47 + ,102.63 + ,103.14 + ,109.3 + ,103.57 + ,102.65 + ,103.12 + ,109.6 + ,103.69 + ,102.54 + ,103.16 + ,109 + ,103.5 + ,102.37 + ,102.48 + ,108.7 + ,103.47 + ,102.68 + ,102.57 + ,108.3 + ,103.45 + ,102.76 + ,102.88 + ,108.4 + ,103.48 + ,102.82 + ,102.63 + ,107.8 + ,103.93 + ,103.31 + ,102.38 + ,107.8 + ,103.89 + ,103.23 + ,101.69 + ,107.6 + ,104.4 + ,103.6 + ,101.96 + ,107.7 + ,104.79 + ,103.95 + ,102.19 + ,107.6 + ,104.77 + ,103.93 + ,101.87 + ,107.6 + ,105.13 + ,104.25 + ,101.6 + ,108.6 + ,105.26 + ,104.38 + ,101.63 + ,108.6 + ,104.96 + ,104.36 + ,101.22 + ,108.2 + ,104.75 + ,104.32 + ,101.21 + ,107.5 + ,105.01 + ,104.58 + ,101.49 + ,107.1 + ,105.15 + ,104.68 + ,101.64 + ,107 + ,105.2 + ,104.92 + ,101.66 + ,106.9 + ,105.77 + ,105.46 + ,101.77 + ,106.6 + ,105.78 + ,105.23 + ,101.82 + ,106.3 + ,106.26 + ,105.58 + ,101.78 + ,106.1 + ,106.13 + ,105.34 + ,101.28 + ,105.9 + ,106.12 + ,105.28 + ,101.29 + ,106 + ,106.57 + ,105.7 + ,101.37 + ,107.2 + ,106.44 + ,105.67 + ,101.12 + ,107.2 + ,106.54 + ,105.71 + ,101.51 + ,106.4 + ,107.1 + ,106.19 + ,102.24 + ,106.1 + ,108.1 + ,106.93 + ,102.94 + ,105.9 + ,108.4 + ,107.44 + ,103.09 + ,106.1 + ,108.84 + ,107.85 + ,103.46 + ,105.9 + ,109.62 + ,108.71 + ,103.64 + ,105.8 + ,110.42 + ,109.32 + ,104.39 + ,105.7 + ,110.67 + ,109.49 + ,104.15 + ,105.6 + ,111.66 + ,110.2 + ,105.21 + ,105.3 + ,112.28 + ,110.62 + ,105.8 + ,105.5 + ,112.87 + ,111.22 + ,105.91 + ,106.5 + ,112.18 + ,110.88 + ,105.39 + ,106.5 + ,112.36 + ,111.15 + ,105.46 + ,106.1 + ,112.16 + ,111.29 + ,104.72 + ,105.9 + ,111.49 + ,111.09 + ,103.14 + ,105.8 + ,111.25 + ,111.24 + ,102.63 + ,106.2 + ,111.36 + ,111.45 + ,102.32 + ,106.5 + ,111.74 + ,111.75 + ,101.93 + ,106.6 + ,111.1 + ,111.07 + ,100.62 + ,106.7 + ,111.33 + ,111.17 + ,100.6 + ,106.6 + ,111.25 + ,110.96 + ,99.63 + ,106.5 + ,111.04 + ,110.5 + ,98.9 + ,106.8 + ,110.97 + ,110.48 + ,98.32 + ,107.8 + ,111.31 + ,110.66 + ,99.22 + ,107.9 + ,111.02 + ,110.46 + ,98.81 + ,107.4) + ,dim=c(4 + ,60) + ,dimnames=list(c('Cons' + ,'Gezond' + ,'Infl' + ,'Werk') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Cons','Gezond','Infl','Werk'),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/1l0qb1262103842.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 = 10.2944, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.91238 > 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/2htvb1262103842.tab") > > try(system("convert tmp/1l0qb1262103842.ps tmp/1l0qb1262103842.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.508 0.213 1.724