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(3494.17,25,8.4,3667.03,29,8.5,3813.06,28,8.7,3917.96,25,8.7,3895.51,26,8.6,3801.06,24,8.5,3570.12,28,8.3,3701.61,28,8,3862.27,28,8.2,3970.1,28,8.1,4138.52,32,8.1,4199.75,31,8,4290.89,22,7.9,4443.91,29,7.9,4502.64,31,8,4356.98,29,8,4591.27,32,7.9,4696.96,32,8,4621.4,31,7.7,4562.84,29,7.2,4202.52,28,7.5,4296.49,28,7.3,4435.23,29,7,4105.18,22,7,4116.68,26,7,3844.49,24,7.2,3720.98,27,7.3,3674.4,27,7.1,3857.62,23,6.8,3801.06,21,6.4,3504.37,19,6.1,3032.6,17,6.5,3047.03,19,7.7,2962.34,21,7.9,2197.82,13,7.5,2014.45,8,6.9,1862.83,5,6.6,1905.41,10,6.9,1810.99,6,7.7,1670.07,6,8,1864.44,8,8,2052.02,11,7.7,2029.6,12,7.3,2070.83,13,7.4,2293.41,19,8.1,2443.27,19,8.3,2513.17,18,8.1,2466.92,20,7.9,2502.66,15,7.9,2539.91,15,8.3,2482.6,15,8.6,2626.15,17,8.7,2656.32,22,8.5,2446.66,17,8.3,2467.38,21,8,2462.32,23,8.1,2504.58,26,8.9,2579.39,26,8.9,2649.24,28,8.7,2636.87,30,8.3),dim=c(3,60),dimnames=list(c('bel20','consumentenvertrouwen','werkloosheid '),1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('bel20','consumentenvertrouwen','werkloosheid '),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'pearson' > main = 'Correlation Matrix' > #'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/1l1cc1293183094.ps",horizontal=F,onefile=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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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] 3 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 7.6098, p-value = 2.753e-14 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6872238 > 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/2ztsl1293183094.tab") > > try(system("convert tmp/1l1cc1293183094.ps tmp/1l1cc1293183094.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.452 0.211 0.946