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 + ,100 + ,100 + ,100 + ,96.66958808 + ,98.54368932 + ,99.67373573 + ,111.8629088 + ,91.06047327 + ,93.93203883 + ,96.9004894 + ,94.1225572 + ,89.04469763 + ,89.32038835 + ,97.06362153 + ,67.79436315 + ,82.90972831 + ,92.7184466 + ,96.41109299 + ,146.0424236 + ,84.04907975 + ,88.34951456 + ,96.08482871 + ,125.6555043 + ,91.76161262 + ,86.89320388 + ,95.26916803 + ,142.8655602 + ,90.09640666 + ,80.33980583 + ,93.47471452 + ,130.0304429 + ,85.97721297 + ,77.66990291 + ,92.4959217 + ,110.0117843 + ,99.82471516 + ,78.88349515 + ,92.82218597 + ,132.789944 + ,70.90271691 + ,77.18446602 + ,101.3050571 + ,88.23529412 + ,83.87379492 + ,78.6407767 + ,102.6101142 + ,91.96700383 + ,99.21121823 + ,88.10679612 + ,102.4469821 + ,96.65128155 + ,92.81332165 + ,92.96116505 + ,99.83686786 + ,97.14720613 + ,95.3549518 + ,95.38834951 + ,97.06362153 + ,90.7345576 + ,89.65819457 + ,97.57281553 + ,97.38988581 + ,52.52872434 + ,86.76599474 + ,98.54368932 + ,96.73735726 + ,156.9085731 + ,88.25591586 + ,102.4271845 + ,96.24796085 + ,144.8787194 + ,101.2269939 + ,105.0970874 + ,94.61663948 + ,169.4294412 + ,88.25591586 + ,109.9514563 + ,93.63784666 + ,133.3840715 + ,96.3190184 + ,110.4368932 + ,93.47471452 + ,131.2776196 + ,100.4382121 + ,112.3786408 + ,93.47471452 + ,116.32623 + ,74.84662577 + ,115.776699 + ,101.141925 + ,89.15349111 + ,88.08063103 + ,112.8640777 + ,102.1207178 + ,85.08298144 + ,100.6134969 + ,110.4368932 + ,101.141925 + ,89.38917804 + ,102.1034181 + ,113.8349515 + ,95.92169657 + ,103.0884808 + ,98.94829097 + ,110.9223301 + ,92.33278956 + ,85.34812923 + ,89.39526731 + ,113.8349515 + ,90.86460033 + ,45.9933222 + ,92.90096407 + ,111.8932039 + ,91.51712887 + ,152.823333 + ,92.28746713 + ,108.7378641 + ,89.55954323 + ,130.3692429 + ,104.1191937 + ,106.0679612 + ,86.7862969 + ,150.5008347 + ,92.98860649 + ,111.1650485 + ,85.80750408 + ,126.971423 + ,95.79316389 + ,113.592233 + ,83.36052202 + ,123.2446234 + ,102.716915 + ,117.7184466 + ,81.40293638 + ,126.5737013 + ,81.06923751 + ,114.5631068 + ,90.53833605 + ,100.2553275 + ,91.32340053 + ,109.223301 + ,92.16965742 + ,91.76077777 + ,98.5977213 + ,108.4951456 + ,88.41761827 + ,100.2847884 + ,107.2743208 + ,102.6699029 + ,85.97063622 + ,121.6537366 + ,99.29886065 + ,102.9126214 + ,83.19738989 + ,97.28960031 + ,87.64241893 + ,97.33009709 + ,83.84991843 + ,62.54541884 + ,97.02015776 + ,101.6990291 + ,84.33931485 + ,154.9936168 + ,98.86064855 + ,101.2135922 + ,82.87112561 + ,147.8493568 + ,96.23137599 + ,101.9417476 + ,80.42414356 + ,147.3976235 + ,102.8045574 + ,92.47572816 + ,79.93474715 + ,156.8005499 + ,95.61787905 + ,98.30097087 + ,76.50897227 + ,126.8093882 + ,101.5775635 + ,93.93203883 + ,77.9771615 + ,131.7637239 + ,84.13672217 + ,89.0776699 + ,86.13376835 + ,99.20946676 + ,87.46713409 + ,90.29126214 + ,87.11256117 + ,87.34655799 + ,102.3663453 + ,77.66990291 + ,84.50244698 + ,100.7561622 + ,101.4022787 + ,63.34951456 + ,82.54486134 + ,110.5666307 + ,87.11656442 + ,43.93203883 + ,81.89233279 + ,76.46076795 + ,82.64680105 + ,27.18446602 + ,84.17618271 + ,56.51085142 + ,79.75460123 + ,30.09708738 + ,86.13376835 + ,124.9484435 + ,81.68273444 + ,20.87378641 + ,86.94942904 + ,118.2853776 + ,90.35933392 + ,19.90291262 + ,87.43882545 + ,136.4332711 + ,82.47151621 + ,25.72815534 + ,87.60195759 + ,128.6212315 + ,80.45574058 + ,30.09708738 + ,85.4812398 + ,100.7365217 + ,90.00876424 + ,39.80582524 + ,87.43882545 + ,111.7499754 + ,72.39263804 + ,41.74757282 + ,95.75856444 + ,93.43022685 + ,78.08939527 + ,52.91262136 + ,97.38988581 + ,83.3300599) + ,dim=c(4 + ,60) + ,dimnames=list(c('TIP' + ,'conjunctuur' + ,'werkloosheid' + ,'INW') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('TIP','conjunctuur','werkloosheid','INW'),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/1y8mr1258120049.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 = 3.2596, p-value = 0.001116 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2892729 > 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/2a2py1258120049.tab") > > system("convert tmp/1y8mr1258120049.ps tmp/1y8mr1258120049.png") > > > proc.time() user system elapsed 0.517 0.218 1.878