R version 2.8.0 (2008-10-20) 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(115.6 + ,29306.0 + ,5250.0 + ,109.7 + ,111.3 + ,28667.0 + ,3937.0 + ,99.1 + ,114.6 + ,28327.0 + ,4004.0 + ,86.7 + ,137.5 + ,28241.0 + ,5560.0 + ,111.4 + ,83.7 + ,28419.0 + ,3922.0 + ,78.4 + ,106.0 + ,28849.0 + ,3759.0 + ,76.7 + ,123.4 + ,29049.0 + ,4138.0 + ,114.2 + ,126.5 + ,29246.0 + ,4634.0 + ,99.7 + ,120.0 + ,29088.0 + ,3996.0 + ,94.2 + ,141.6 + ,29690.0 + ,4308.0 + ,173.5 + ,90.5 + ,29947.0 + ,4143.0 + ,83.1 + ,96.5 + ,30266.0 + ,4429.0 + ,88.9 + ,113.5 + ,30383.0 + ,5219.0 + ,132.0 + ,120.1 + ,29799.0 + ,4929.0 + ,122.1 + ,123.9 + ,29821.0 + ,5755.0 + ,105.1 + ,144.4 + ,29339.0 + ,5592.0 + ,133.7 + ,90.8 + ,29770.0 + ,4163.0 + ,63.6 + ,114.2 + ,29611.0 + ,4962.0 + ,112.7 + ,138.1 + ,29594.0 + ,5208.0 + ,120.5 + ,135.0 + ,29339.0 + ,4755.0 + ,112.0 + ,131.3 + ,29217.0 + ,4491.0 + ,126.2 + ,144.6 + ,29603.0 + ,5732.0 + ,209.2 + ,101.7 + ,30218.0 + ,5731.0 + ,91.0 + ,108.7 + ,30269.0 + ,5040.0 + ,116.7 + ,135.3 + ,30216.0 + ,6102.0 + ,137.6 + ,124.3 + ,29882.0 + ,4904.0 + ,108.1 + ,138.3 + ,29721.0 + ,5369.0 + ,136.6 + ,158.2 + ,29373.0 + ,5578.0 + ,152.3 + ,93.5 + ,30006.0 + ,4619.0 + ,114.3 + ,124.8 + ,29774.0 + ,4731.0 + ,120.7 + ,154.4 + ,29792.0 + ,5011.0 + ,131.8 + ,152.8 + ,29300.0 + ,5299.0 + ,129.4 + ,148.9 + ,28827.0 + ,4146.0 + ,187.5 + ,170.3 + ,28958.0 + ,4625.0 + ,189.5 + ,124.8 + ,29212.0 + ,4736.0 + ,109.2 + ,134.4 + ,28914.0 + ,4219.0 + ,158.1 + ,154.0 + ,28147.0 + ,5116.0 + ,176.2 + ,147.9 + ,28106.0 + ,4205.0 + ,125.5 + ,168.1 + ,27531.0 + ,4121.0 + ,155.0 + ,175.7 + ,26738.0 + ,5103.0 + ,170.3 + ,116.7 + ,28080.0 + ,4300.0 + ,99.4 + ,140.8 + ,27959.0 + ,4578.0 + ,139.2 + ,164.2 + ,27298.0 + ,3809.0 + ,169.6 + ,173.8 + ,27198.0 + ,5526.0 + ,136.1 + ,167.8 + ,26793.0 + ,4247.0 + ,168.2 + ,166.6 + ,27379.0 + ,3830.0 + ,318.6 + ,135.1 + ,27583.0 + ,4394.0 + ,154.1 + ,158.1 + ,27336.0 + ,4826.0 + ,161.4 + ,151.8 + ,27005.0 + ,4409.0 + ,183.4 + ,166.7 + ,27039.0 + ,4569.0 + ,166.3 + ,165.3 + ,26236.0 + ,4106.0 + ,203 + ,187.0 + ,26450.0 + ,4794.0 + ,174.6 + ,125.2 + ,27748.0 + ,3914.0 + ,124.3 + ,144.4 + ,27469.0 + ,3793.0 + ,154.4 + ,181.7 + ,27147.0 + ,4405.0 + ,170.5 + ,175.9 + ,27376.0 + ,4022.0 + ,169.4 + ,166.3 + ,27709.0 + ,4100.0 + ,171.1 + ,181.5 + ,28977.0 + ,4788.0 + ,289.2 + ,121.8 + ,29944.0 + ,3163.0 + ,145.6 + ,134.8 + ,30793.0 + ,3585.0 + ,134.4 + ,162.9 + ,31861.0 + ,3903.0 + ,168.2) + ,dim=c(4 + ,61) + ,dimnames=list(c('omzet' + ,'werkloosheid' + ,'bouwvergunningen' + ,'investeringen') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('omzet','werkloosheid','bouwvergunningen','investeringen'),1:61)) > 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/freestat/rcomp/tmp/11fvh1257365415.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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.8604, p-value = 1.172e-06 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.4271261 > 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/freestat/rcomp/tmp/2qh3q1257365415.tab") > > system("convert tmp/11fvh1257365415.ps tmp/11fvh1257365415.png") > > > proc.time() user system elapsed 0.717 0.303 0.777