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(8.9 + ,2.86 + ,101 + ,100.64 + ,8.6 + ,2.55 + ,100.88 + ,100.63 + ,8.3 + ,2.27 + ,100.55 + ,100.43 + ,8.3 + ,2.26 + ,100.83 + ,100.80 + ,8.3 + ,2.57 + ,101.51 + ,101.33 + ,8.4 + ,3.07 + ,102.16 + ,101.88 + ,8.5 + ,2.76 + ,102.39 + ,101.85 + ,8.4 + ,2.51 + ,102.54 + ,102.04 + ,8.6 + ,2.87 + ,102.85 + ,102.22 + ,8.5 + ,3.14 + ,103.47 + ,102.63 + ,8.5 + ,3.11 + ,103.57 + ,102.65 + ,8.5 + ,3.16 + ,103.69 + ,102.54 + ,8.5 + ,2.47 + ,103.5 + ,102.37 + ,8.5 + ,2.57 + ,103.47 + ,102.68 + ,8.5 + ,2.89 + ,103.45 + ,102.76 + ,8.5 + ,2.63 + ,103.48 + ,102.82 + ,8.5 + ,2.38 + ,103.93 + ,103.31 + ,8.5 + ,1.69 + ,103.89 + ,103.23 + ,8.5 + ,1.96 + ,104.4 + ,103.60 + ,8.5 + ,2.19 + ,104.79 + ,103.95 + ,8.6 + ,1.87 + ,104.77 + ,103.93 + ,8.4 + ,1.6 + ,105.13 + ,104.25 + ,8.1 + ,1.63 + ,105.26 + ,104.38 + ,8 + ,1.22 + ,104.96 + ,104.36 + ,8 + ,1.21 + ,104.75 + ,104.32 + ,8 + ,1.49 + ,105.01 + ,104.58 + ,8 + ,1.64 + ,105.15 + ,104.68 + ,7.9 + ,1.66 + ,105.2 + ,104.92 + ,7.8 + ,1.77 + ,105.77 + ,105.46 + ,7.8 + ,1.82 + ,105.78 + ,105.23 + ,7.9 + ,1.78 + ,106.26 + ,105.58 + ,8.1 + ,1.28 + ,106.13 + ,105.34 + ,8 + ,1.29 + ,106.12 + ,105.28 + ,7.6 + ,1.37 + ,106.57 + ,105.70 + ,7.3 + ,1.12 + ,106.44 + ,105.67 + ,7 + ,1.51 + ,106.54 + ,105.71 + ,6.8 + ,2.24 + ,107.1 + ,106.19 + ,7 + ,2.94 + ,108.1 + ,106.93 + ,7.1 + ,3.09 + ,108.4 + ,107.44 + ,7.2 + ,3.46 + ,108.84 + ,107.85 + ,7.1 + ,3.64 + ,109.62 + ,108.71 + ,6.9 + ,4.39 + ,110.42 + ,109.32 + ,6.7 + ,4.15 + ,110.67 + ,109.49 + ,6.7 + ,5.21 + ,111.66 + ,110.20 + ,6.6 + ,5.8 + ,112.28 + ,110.62 + ,6.9 + ,5.91 + ,112.87 + ,111.22 + ,7.3 + ,5.39 + ,112.18 + ,110.88 + ,7.5 + ,5.46 + ,112.36 + ,111.15 + ,7.3 + ,4.72 + ,112.16 + ,111.29 + ,7.1 + ,3.14 + ,111.49 + ,111.09 + ,6.9 + ,2.63 + ,111.25 + ,111.24 + ,7.1 + ,2.32 + ,111.36 + ,111.45 + ,7.5 + ,1.93 + ,111.74 + ,111.75 + ,7.7 + ,0.62 + ,111.1 + ,111.07 + ,7.8 + ,0.6 + ,111.33 + ,111.17 + ,7.8 + ,-0.37 + ,111.25 + ,110.96 + ,7.7 + ,-1.1 + ,111.04 + ,110.50 + ,7.7 + ,-1.68 + ,110.97 + ,110.48 + ,7.8 + ,-0.78 + ,111.31 + ,110.66 + ,7.9 + ,-1.19 + ,111.02 + ,110.46) + ,dim=c(4 + ,60) + ,dimnames=list(c('Werkl' + ,'Inflatie' + ,'ICP' + ,'gezondh_Ind ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Werkl','Inflatie','ICP','gezondh_Ind '),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/1xkrt1258075912.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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.5004, p-value = 0.6168 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.0456394 > 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/2k4zf1258075912.tab") > system("convert tmp/1xkrt1258075912.ps tmp/1xkrt1258075912.png") > > > proc.time() user system elapsed 0.514 0.215 0.651