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(186448 + ,17822 + ,1942 + ,16739 + ,4872 + ,1020 + ,190530 + ,22422 + ,2547 + ,17851 + ,4905 + ,1200 + ,194207 + ,18817 + ,2033 + ,17034 + ,4971 + ,1279 + ,190855 + ,22043 + ,2049 + ,18055 + ,4971 + ,1308 + ,200779 + ,19191 + ,2007 + ,18216 + ,4930 + ,1173 + ,204428 + ,23171 + ,2660 + ,18960 + ,5001 + ,1291 + ,207617 + ,19463 + ,2063 + ,17903 + ,5059 + ,1466 + ,212071 + ,22522 + ,2113 + ,18842 + ,5085 + ,1507 + ,214239 + ,20265 + ,2145 + ,18907 + ,5111 + ,1478 + ,215883 + ,24249 + ,2866 + ,19862 + ,5190 + ,1629 + ,223484 + ,20299 + ,2163 + ,18836 + ,5076 + ,1712 + ,221529 + ,25455 + ,2157 + ,19846 + ,5134 + ,1727 + ,225247 + ,21089 + ,2201 + ,19511 + ,4804 + ,1519 + ,226699 + ,26237 + ,2838 + ,20318 + ,4579 + ,1617 + ,231406 + ,21362 + ,2142 + ,19843 + ,4526 + ,1637 + ,232324 + ,26489 + ,2253 + ,20975 + ,4550 + ,1633 + ,237192 + ,21828 + ,2258 + ,20485 + ,4566 + ,1469 + ,236727 + ,27496 + ,2979 + ,21407 + ,4588 + ,1657 + ,240698 + ,21991 + ,2288 + ,20404 + ,4564 + ,1599 + ,240688 + ,27611 + ,2431 + ,21454 + ,4723 + ,1420 + ,245283 + ,22512 + ,2393 + ,21558 + ,4553 + ,1495 + ,243556 + ,28581 + ,3244 + ,22442 + ,4556 + ,1623 + ,247826 + ,23000 + ,2476 + ,21201 + ,4542 + ,1346 + ,245798 + ,28385 + ,2490 + ,21804 + ,4234 + ,1613 + ,250479 + ,23387 + ,2547 + ,22537 + ,4341 + ,1563 + ,249216 + ,30192 + ,3461 + ,22736 + ,4269 + ,2071 + ,251896 + ,24346 + ,2549 + ,21525 + ,4217 + ,1584 + ,247616 + ,30393 + ,2496 + ,22427 + ,4207 + ,1843 + ,249994 + ,24753 + ,2532 + ,23437 + ,4267 + ,1598 + ,246552 + ,31723 + ,3553 + ,23366 + ,4249 + ,1687 + ,248771 + ,24838 + ,2555 + ,22281 + ,4217 + ,1473 + ,247551 + ,32272 + ,2565 + ,22994 + ,4172 + ,2080 + ,249745 + ,25219 + ,2548 + ,24007 + ,4161 + ,1703 + ,245742 + ,33191 + ,3932 + ,24145 + ,4103 + ,1832 + ,249019 + ,26218 + ,2525 + ,23065 + ,4027 + ,1781 + ,245841 + ,33537 + ,2633 + ,24374 + ,4042 + ,2481 + ,248771 + ,27975 + ,2657 + ,24805 + ,4120 + ,1977 + ,244723 + ,34356 + ,3829 + ,25159 + ,4188 + ,1974 + ,246878 + ,27082 + ,2769 + ,23751 + ,4185 + ,1777 + ,246014 + ,34333 + ,2816 + ,25487 + ,4216 + ,2303 + ,248496 + ,28141 + ,3052 + ,25608 + ,4250 + ,1480 + ,244351 + ,36125 + ,4146 + ,26396 + ,4259 + ,1907 + ,248016 + ,28451 + ,3185 + ,25207 + ,4206 + ,1610 + ,246509 + ,35801 + ,3147 + ,27000 + ,4132 + ,1546 + ,249426 + ,28979 + ,3161 + ,27369 + ,3944 + ,1718 + ,247840 + ,37285 + ,4311 + ,28401 + ,3872 + ,1841 + ,251035 + ,30310 + ,3155 + ,27126 + ,3797 + ,1650 + ,250161 + ,36721 + ,3284 + ,28474 + ,3840 + ,1671 + ,254278 + ,29534 + ,3350 + ,28926 + ,3895 + ,1974 + ,250801 + ,38626 + ,4268 + ,29894 + ,3633 + ,2153 + ,253985 + ,29654 + ,3220 + ,28822 + ,3622 + ,1898 + ,249174 + ,42638 + ,8289 + ,29849 + ,3562 + ,2725 + ,251287 + ,31372 + ,3419 + ,30624 + ,3555 + ,2047 + ,247947 + ,39603 + ,3902 + ,31038 + ,3489 + ,1698 + ,249992 + ,31647 + ,3223 + ,29468 + ,3500 + ,1768 + ,243805 + ,39946 + ,3447 + ,31294 + ,3373 + ,1921 + ,255812 + ,31518 + ,3389 + ,32110 + ,3285 + ,9782 + ,250417 + ,42743 + ,4637 + ,32827 + ,3292 + ,2231 + ,253033 + ,33462 + ,3509 + ,31327 + ,3241 + ,2062 + ,248705 + ,41744 + ,4107 + ,32749 + ,3266 + ,2132 + ,253950 + ,33142 + ,3632 + ,33598 + ,3168 + ,2465 + ,251484 + ,41753 + ,4490 + ,33878 + ,3181 + ,2198 + ,251093 + ,35487 + ,3649 + ,32292 + ,3246 + ,2330 + ,245996 + ,44720 + ,3983 + ,34021 + ,3159 + ,1214 + ,252721 + ,33472 + ,3678 + ,34955 + ,3209 + ,2517 + ,248019 + ,45134 + ,4570 + ,35322 + ,3220 + ,2255 + ,250464 + ,36255 + ,3778 + ,33816 + ,3305 + ,2379 + ,245571 + ,46228 + ,4153 + ,35766 + ,3251 + ,2349 + ,252690 + ,35483 + ,4027 + ,36770 + ,3281 + ,2219 + ,250183 + ,47663 + ,5050 + ,37762 + ,3304 + ,2470 + ,253639 + ,38064 + ,4155 + ,36298 + ,3270 + ,2540 + ,254436 + ,47177 + ,4475 + ,39219 + ,3377 + ,2667 + ,265280 + ,35062 + ,4117 + ,39664 + ,3235 + ,3507 + ,268705 + ,45062 + ,5193 + ,40178 + ,3125 + ,2972 + ,270643 + ,36943 + ,4199 + ,38402 + ,3091 + ,2678 + ,271480 + ,46194 + ,4391 + ,40957 + ,3102 + ,2979) + ,dim=c(6 + ,76) + ,dimnames=list(c('Nettoschuld' + ,'ParafiscOntvangsten' + ,'NonParafiscaleOntvangsten' + ,'LopendeUitgaven' + ,'Rentelasten' + ,'Kapitaaluitgaven') + ,1:76)) > y <- array(NA,dim=c(6,76),dimnames=list(c('Nettoschuld','ParafiscOntvangsten','NonParafiscaleOntvangsten','LopendeUitgaven','Rentelasten','Kapitaaluitgaven'),1:76)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'kendall' > main = 'Correlation Matrix' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > 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=par1) + 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/1vk1q1292964267.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) > 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") > > n <- length(y[,1]) > n [1] 6 > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ',header=TRUE) > for (i in 1:n) { + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + } > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + for (j in 1:n) { + r <- cor.test(y[i,],y[j,],method=par1) + a<-table.element(a,round(r$estimate,3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2hl0w1292964267.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'Pearson r',1,TRUE) > a<-table.element(a,'Spearman rho',1,TRUE) > a<-table.element(a,'Kendall tau',1,TRUE) > a<-table.row.end(a) > cor.test(y[1,],y[2,],method=par1) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 5.5299, p-value = 3.204e-08 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4327075 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') + a<-table.element(a,dum,header=TRUE) + rp <- cor.test(y[i,],y[j,],method='pearson') + a<-table.element(a,round(rp$estimate,4)) + rs <- cor.test(y[i,],y[j,],method='spearman') + a<-table.element(a,round(rs$estimate,4)) + rk <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,round(rk$estimate,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-value',header=T) + a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) + a<-table.row.end(a) + } + } There were 14 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3ddg51292964267.tab") > > try(system("convert tmp/1vk1q1292964267.ps tmp/1vk1q1292964267.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.781 0.281 2.761