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(100.00 + ,100.00 + ,100.00 + ,100.00 + ,101.25 + ,98.20 + ,117.87 + ,95.00 + ,96.25 + ,90.09 + ,113.95 + ,117.50 + ,93.75 + ,82.88 + ,107.33 + ,107.50 + ,95.00 + ,82.88 + ,104.96 + ,97.50 + ,97.50 + ,85.59 + ,97.73 + ,100.00 + ,97.50 + ,86.49 + ,99.07 + ,107.50 + ,97.50 + ,85.59 + ,108.16 + ,120.00 + ,93.75 + ,81.98 + ,106.20 + ,110.00 + ,93.75 + ,80.18 + ,101.34 + ,107.50 + ,88.75 + ,81.08 + ,117.67 + ,117.50 + ,93.75 + ,90.99 + ,83.57 + ,117.50 + ,93.75 + ,92.79 + ,98.86 + ,122.50 + ,95.00 + ,91.89 + ,116.94 + ,125.00 + ,96.25 + ,86.49 + ,109.40 + ,105.00 + ,96.25 + ,82.88 + ,112.40 + ,107.50 + ,98.75 + ,83.78 + ,105.68 + ,120.00 + ,101.25 + ,84.68 + ,102.27 + ,120.00 + ,102.50 + ,84.68 + ,104.03 + ,120.00 + ,102.50 + ,82.88 + ,119.32 + ,105.00 + ,102.50 + ,81.08 + ,104.03 + ,115.00 + ,98.75 + ,81.08 + ,113.53 + ,120.00 + ,91.25 + ,81.08 + ,118.39 + ,112.50 + ,86.25 + ,88.29 + ,88.22 + ,110.00 + ,82.50 + ,90.09 + ,103.82 + ,107.50 + ,83.75 + ,88.29 + ,118.60 + ,97.50 + ,86.25 + ,83.78 + ,120.35 + ,92.50 + ,87.50 + ,81.08 + ,116.63 + ,100.00 + ,88.75 + ,81.08 + ,105.37 + ,102.50 + ,90.00 + ,81.98 + ,109.50 + ,92.50 + ,88.75 + ,81.98 + ,108.78 + ,95.00 + ,86.25 + ,81.98 + ,122.73 + ,95.00 + ,87.50 + ,82.88 + ,109.61 + ,95.00 + ,85.00 + ,79.28 + ,112.91 + ,82.50 + ,80.00 + ,74.77 + ,121.07 + ,82.50 + ,83.75 + ,75.68 + ,95.56 + ,82.50 + ,82.50 + ,72.97 + ,107.64 + ,80.00 + ,80.00 + ,69.37 + ,116.22 + ,85.00 + ,78.75 + ,71.17 + ,126.45 + ,105.00 + ,77.50 + ,71.17 + ,117.05 + ,122.50 + ,81.25 + ,72.07 + ,103.31 + ,127.50 + ,85.00 + ,71.17 + ,114.36 + ,137.50 + ,85.00 + ,68.47 + ,116.53 + ,140.00 + ,80.00 + ,63.96 + ,113.43 + ,160.00 + ,76.25 + ,61.26 + ,121.18 + ,152.50 + ,72.50 + ,58.56 + ,112.71 + ,177.50 + ,76.25 + ,62.16 + ,119.73 + ,195.00 + ,90.00 + ,73.87 + ,99.17 + ,197.50 + ,91.25 + ,78.38 + ,103.10 + ,185.00 + ,86.25 + ,74.77 + ,120.66 + ,187.50 + ,76.25 + ,71.17 + ,119.52 + ,170.00 + ,72.50 + ,67.57 + ,102.69 + ,130.00 + ,77.50 + ,70.27 + ,97.42 + ,117.50 + ,88.75 + ,74.77 + ,94.01 + ,102.50 + ,96.25 + ,75.68 + ,96.28 + ,97.50 + ,98.75 + ,73.87 + ,106.51 + ,65.00 + ,96.25 + ,69.37 + ,97.21 + ,67.50 + ,92.50 + ,64.86 + ,94.83 + ,45.00 + ,93.75 + ,65.77 + ,106.10 + ,25.00 + ,100.00 + ,72.97 + ,85.33 + ,7.50) + ,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/1ldo81257511770.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/2nkzq1257511770.tab") > > system("convert tmp/1ldo81257511770.ps tmp/1ldo81257511770.png") > > > proc.time() user system elapsed 0.507 0.231 0.573