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.00 + ,11.10 + ,96.80 + ,4.00 + ,8.10 + ,10.90 + ,114.10 + ,3.80 + ,7.70 + ,10.00 + ,110.30 + ,4.70 + ,7.50 + ,9.20 + ,103.90 + ,4.30 + ,7.60 + ,9.20 + ,101.60 + ,3.90 + ,7.80 + ,9.50 + ,94.60 + ,4.00 + ,7.80 + ,9.60 + ,95.90 + ,4.30 + ,7.80 + ,9.50 + ,104.70 + ,4.80 + ,7.50 + ,9.10 + ,102.80 + ,4.40 + ,7.50 + ,8.90 + ,98.10 + ,4.30 + ,7.10 + ,9.00 + ,113.90 + ,4.70 + ,7.50 + ,10.10 + ,80.90 + ,4.70 + ,7.50 + ,10.30 + ,95.70 + ,4.90 + ,7.60 + ,10.20 + ,113.20 + ,5.00 + ,7.70 + ,9.60 + ,105.90 + ,4.20 + ,7.70 + ,9.20 + ,108.80 + ,4.30 + ,7.90 + ,9.30 + ,102.30 + ,4.80 + ,8.10 + ,9.40 + ,99.00 + ,4.80 + ,8.20 + ,9.40 + ,100.70 + ,4.80 + ,8.20 + ,9.20 + ,115.50 + ,4.20 + ,8.20 + ,9.00 + ,100.70 + ,4.60 + ,7.90 + ,9.00 + ,109.90 + ,4.80 + ,7.30 + ,9.00 + ,114.60 + ,4.50 + ,6.90 + ,9.80 + ,85.40 + ,4.40 + ,6.60 + ,10.00 + ,100.50 + ,4.30 + ,6.70 + ,9.80 + ,114.80 + ,3.90 + ,6.90 + ,9.30 + ,116.50 + ,3.70 + ,7.00 + ,9.00 + ,112.90 + ,4.00 + ,7.10 + ,9.00 + ,102.00 + ,4.10 + ,7.20 + ,9.10 + ,106.00 + ,3.70 + ,7.10 + ,9.10 + ,105.30 + ,3.80 + ,6.90 + ,9.10 + ,118.80 + ,3.80 + ,7.00 + ,9.20 + ,106.10 + ,3.80 + ,6.80 + ,8.80 + ,109.30 + ,3.30 + ,6.40 + ,8.30 + ,117.20 + ,3.30 + ,6.70 + ,8.40 + ,92.50 + ,3.30 + ,6.60 + ,8.10 + ,104.20 + ,3.20 + ,6.40 + ,7.70 + ,112.50 + ,3.40 + ,6.30 + ,7.90 + ,122.40 + ,4.20 + ,6.20 + ,7.90 + ,113.30 + ,4.90 + ,6.50 + ,8.00 + ,100.00 + ,5.10 + ,6.80 + ,7.90 + ,110.70 + ,5.50 + ,6.80 + ,7.60 + ,112.80 + ,5.60 + ,6.40 + ,7.10 + ,109.80 + ,6.40 + ,6.10 + ,6.80 + ,117.30 + ,6.10 + ,5.80 + ,6.50 + ,109.10 + ,7.10 + ,6.10 + ,6.90 + ,115.90 + ,7.80 + ,7.20 + ,8.20 + ,96.00 + ,7.90 + ,7.30 + ,8.70 + ,99.80 + ,7.40 + ,6.90 + ,8.30 + ,116.80 + ,7.50 + ,6.10 + ,7.90 + ,115.70 + ,6.80 + ,5.80 + ,7.50 + ,99.40 + ,5.20 + ,6.20 + ,7.80 + ,94.30 + ,4.70 + ,7.10 + ,8.30 + ,91.00 + ,4.10 + ,7.70 + ,8.40 + ,93.20 + ,3.90 + ,7.90 + ,8.20 + ,103.10 + ,2.60 + ,7.70 + ,7.70 + ,94.10 + ,2.70 + ,7.40 + ,7.20 + ,91.80 + ,1.80 + ,7.50 + ,7.30 + ,102.70 + ,1.00 + ,8.00 + ,8.10 + ,82.60 + ,0.30) + ,dim=c(4 + ,60) + ,dimnames=list(c('werklhmannen' + ,'werklhvrouwen' + ,'ecogroei' + ,'inflatie') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('werklhmannen','werklhvrouwen','ecogroei','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/html/rcomp/tmp/1j9q31257511921.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 = 4.6783, p-value = 2.892e-06 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4268654 > 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/2643x1257511921.tab") > > system("convert tmp/1j9q31257511921.ps tmp/1j9q31257511921.png") > > > proc.time() user system elapsed 0.477 0.206 0.596