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(10284.5 + ,9904.642857 + ,12792 + ,13710.15385 + ,12823.61538 + ,13747.69231 + ,13845.66667 + ,14517 + ,15335.63636 + ,15185.81818 + ,11188.5 + ,11422.28571 + ,13633.25 + ,13819.66667 + ,12298.46667 + ,12749 + ,15353.63636 + ,16217 + ,12696.15385 + ,13238 + ,12213.93333 + ,12391 + ,13683.72727 + ,14780.09091 + ,11214.14286 + ,10815.42857 + ,13950.23077 + ,14770.84615 + ,11179.13333 + ,11831 + ,11801.875 + ,11931.3125 + ,11188.82353 + ,10611.94118 + ,16456.27273 + ,15923.18182 + ,11110.0625 + ,11094.875 + ,16530.69231 + ,16209.53846 + ,10038.41176 + ,10100 + ,11681.25 + ,12149.6875 + ,11148.88235 + ,11644.35294 + ,8631 + ,9249.947368 + ,9386.444444 + ,8980.777778 + ,9764.736842 + ,10244.52632 + ,12043.75 + ,12457.5625 + ,12948.06667 + ,13307.46667 + ,10987.125 + ,10839.625 + ,11648.3125 + ,11827.625 + ,10633.35294 + ,10925.94118 + ,10219.3 + ,10675.3 + ,9037.6 + ,9297.3 + ,10296.31579 + ,10433.21053 + ,11705.41176 + ,12261.41176 + ,10681.94444 + ,10911.22222 + ,9362.947368 + ,9334.421053 + ,11306.35294 + ,11655.05882 + ,10984.45 + ,11080 + ,10062.61905 + ,9840.142857 + ,8118.583333 + ,7448.916667 + ,8867.48 + ,8362.6 + ,8346.72 + ,8465.64 + ,8529.307692 + ,8220.923077 + ,10697.18182 + ,10432.86364 + ,8591.84 + ,8537.4 + ,8695.607143 + ,8535.464286 + ,8125.571429 + ,7997.464286 + ,7009.758621 + ,6301.413793 + ,7883.466667 + ,7595.566667 + ,7527.645161 + ,7200.483871 + ,6763.758621 + ,6152.482759 + ,6682.333333 + ,6064.259259 + ,7855.681818 + ,7269.909091 + ,6738.88 + ,6578.44 + ,7895.434783 + ,7708.26087 + ,6361.884615 + ,6401.153846 + ,6935.956522 + ,7042.043478 + ,8344.454545 + ,8296.409091 + ,9107.944444 + ,9613.333333) + ,dim=c(2 + ,60) + ,dimnames=list(c('Invoer/inflatie' + ,'Uitvoer/inflatie') + ,1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Invoer/inflatie','Uitvoer/inflatie'),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/1gr1n1257794261.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] 2 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 10.447, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.9254237 > 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/2hpp51257794261.tab") > > system("convert tmp/1gr1n1257794261.ps tmp/1gr1n1257794261.png") > > > proc.time() user system elapsed 0.420 0.210 0.701