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(8.9 + ,1.6 + ,90398 + ,3633 + ,180600 + ,8.8 + ,1.8 + ,90269 + ,3597 + ,179835 + ,8.3 + ,1.6 + ,90390 + ,3600 + ,179390 + ,7.5 + ,1.5 + ,88219 + ,3522 + ,181871 + ,7.2 + ,1.5 + ,87032 + ,3503 + ,175153 + ,7.4 + ,1.3 + ,87175 + ,3532 + ,177709 + ,8.8 + ,1.4 + ,92603 + ,3686 + ,190370 + ,9.3 + ,1.4 + ,93571 + ,3748 + ,193423 + ,9.3 + ,1.3 + ,94118 + ,3672 + ,193211 + ,8.7 + ,1.3 + ,92159 + ,3843 + ,192691 + ,8.2 + ,1.2 + ,89528 + ,3905 + ,188728 + ,8.3 + ,1.1 + ,89955 + ,3999 + ,192632 + ,8.5 + ,1.4 + ,89587 + ,4070 + ,192977 + ,8.6 + ,1.2 + ,89488 + ,4084 + ,192941 + ,8.5 + ,1.5 + ,88521 + ,4042 + ,192822 + ,8.2 + ,1.1 + ,86587 + ,3951 + ,189644 + ,8.1 + ,1.3 + ,85159 + ,3933 + ,189056 + ,7.9 + ,1.5 + ,84915 + ,3958 + ,190574 + ,8.6 + ,1.1 + ,91378 + ,4147 + ,204210 + ,8.7 + ,1.4 + ,92729 + ,4221 + ,204888 + ,8.7 + ,1.3 + ,92194 + ,4058 + ,201858 + ,8.5 + ,1.5 + ,89664 + ,4057 + ,197077 + ,8.4 + ,1.6 + ,86285 + ,4089 + ,192734 + ,8.5 + ,1.7 + ,86858 + ,4268 + ,196020 + ,8.7 + ,1.1 + ,87184 + ,4309 + ,197603 + ,8.7 + ,1.6 + ,86629 + ,4303 + ,197965 + ,8.6 + ,1.3 + ,85220 + ,4177 + ,195756 + ,8.5 + ,1.7 + ,84816 + ,4117 + ,195182 + ,8.3 + ,1.6 + ,84831 + ,4065 + ,195728 + ,8 + ,1.7 + ,84957 + ,3983 + ,196950 + ,8.2 + ,1.9 + ,90951 + ,4091 + ,210029 + ,8.1 + ,1.8 + ,92134 + ,4067 + ,211516 + ,8.1 + ,1.9 + ,91790 + ,4024 + ,205624 + ,8 + ,1.6 + ,86625 + ,3868 + ,195776 + ,7.9 + ,1.5 + ,83324 + ,3800 + ,189706 + ,7.9 + ,1.6 + ,82719 + ,3804 + ,190040 + ,8 + ,1.6 + ,83614 + ,3862 + ,191434 + ,8 + ,1.7 + ,81640 + ,3792 + ,187925 + ,7.9 + ,2 + ,78665 + ,3674 + ,182239 + ,8 + ,2 + ,77828 + ,3560 + ,182031 + ,7.7 + ,1.9 + ,75728 + ,3489 + ,178459 + ,7.2 + ,1.7 + ,72187 + ,3412 + ,173278 + ,7.5 + ,1.8 + ,79357 + ,3674 + ,191660 + ,7.3 + ,1.9 + ,81329 + ,3672 + ,194075 + ,7 + ,1.7 + ,77304 + ,3463 + ,181591 + ,7 + ,2 + ,75576 + ,3429 + ,177660 + ,7 + ,2.1 + ,72932 + ,3400 + ,172607 + ,7.2 + ,2.4 + ,74291 + ,3533 + ,176520 + ,7.3 + ,2.5 + ,74988 + ,3578 + ,177271 + ,7.1 + ,2.5 + ,73302 + ,3544 + ,174540 + ,6.8 + ,2.6 + ,70483 + ,3435 + ,170148 + ,6.4 + ,2.2 + ,69848 + ,3352 + ,169799 + ,6.1 + ,2.5 + ,66466 + ,3213 + ,163249 + ,6.5 + ,2.8 + ,67610 + ,3235 + ,167363 + ,7.7 + ,2.8 + ,75091 + ,3460 + ,185332 + ,7.9 + ,2.9 + ,76207 + ,3385 + ,185969 + ,7.5 + ,3 + ,73454 + ,3283 + ,174955 + ,6.9 + ,3.1 + ,72008 + ,3295 + ,172088 + ,6.6 + ,2.9 + ,71362 + ,3331 + ,172037 + ,6.9 + ,2.7 + ,74250 + ,3520 + ,179351) + ,dim=c(5 + ,60) + ,dimnames=list(c('graad' + ,'inflatie' + ,'leeftijd' + ,'landbouw' + ,'diensten') + ,1:60)) > y <- array(NA,dim=c(5,60),dimnames=list(c('graad','inflatie','leeftijd','landbouw','diensten'),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/rcomp/tmp/1lgn11257682901.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] 5 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -5.5811, p-value = 2.39e-08 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.5161984 > 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/2n9jg1257682901.tab") > > system("convert tmp/1lgn11257682901.ps tmp/1lgn11257682901.png") > > > proc.time() user system elapsed 0.580 0.490 1.072