R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(176508 + ,12 + ,60 + ,38 + ,146 + ,165446 + ,0 + ,69 + ,25 + ,93 + ,237213 + ,0 + ,78 + ,38 + ,140 + ,133131 + ,7 + ,44 + ,30 + ,99 + ,324799 + ,0 + ,158 + ,47 + ,181 + ,236785 + ,3 + ,77 + ,31 + ,116 + ,344297 + ,1 + ,80 + ,30 + ,108 + ,174724 + ,0 + ,123 + ,34 + ,129 + ,174415 + ,0 + ,73 + ,31 + ,118 + ,223632 + ,0 + ,105 + ,33 + ,125 + ,124817 + ,0 + ,47 + ,25 + ,95 + ,325107 + ,0 + ,84 + ,36 + ,136 + ,7176 + ,0 + ,0 + ,0 + ,0 + ,265769 + ,2 + ,96 + ,32 + ,124 + ,175824 + ,0 + ,57 + ,20 + ,80 + ,111665 + ,4 + ,39 + ,28 + ,104 + ,362301 + ,2 + ,76 + ,34 + ,125 + ,168809 + ,0 + ,76 + ,28 + ,118 + ,24188 + ,0 + ,8 + ,4 + ,12 + ,329267 + ,8 + ,79 + ,39 + ,144 + ,218946 + ,1 + ,76 + ,29 + ,108 + ,244052 + ,5 + ,101 + ,44 + ,166 + ,341570 + ,1 + ,94 + ,21 + ,80 + ,256462 + ,0 + ,123 + ,35 + ,127 + ,196553 + ,2 + ,41 + ,29 + ,111 + ,174184 + ,0 + ,72 + ,25 + ,98 + ,187559 + ,8 + ,75 + ,36 + ,135 + ,73566 + ,6 + ,22 + ,23 + ,88 + ,182999 + ,6 + ,73 + ,34 + ,129 + ,152299 + ,0 + ,62 + ,33 + ,122 + ,346485 + ,0 + ,118 + ,38 + ,147 + ,193339 + ,2 + ,100 + ,35 + ,87 + ,122774 + ,0 + ,24 + ,24 + ,90 + ,112611 + ,0 + ,46 + ,20 + ,78 + ,286468 + ,1 + ,57 + ,29 + ,111 + ,148446 + ,1 + ,135 + ,37 + ,141 + ,140344 + ,6 + ,33 + ,25 + ,93 + ,220516 + ,1 + ,98 + ,32 + ,124 + ,243060 + ,4 + ,58 + ,29 + ,112 + ,162765 + ,2 + ,68 + ,28 + ,108 + ,232138 + ,0 + ,131 + ,31 + ,117 + ,85574 + ,0 + ,37 + ,21 + ,78 + ,232317 + ,0 + ,118 + ,33 + ,126 + ,164709 + ,0 + ,81 + ,31 + ,115 + ,220801 + ,1 + ,51 + ,18 + ,72 + ,92661 + ,1 + ,40 + ,17 + ,45 + ,133328 + ,0 + ,56 + ,20 + ,78 + ,61361 + ,0 + ,27 + ,12 + ,39 + ,100750 + ,0 + ,83 + ,30 + ,119 + ,101523 + ,0 + ,59 + ,22 + ,88 + ,243511 + ,0 + ,133 + ,42 + ,155 + ,22938 + ,0 + ,12 + ,1 + ,0 + ,152474 + ,0 + ,106 + ,32 + ,123 + ,132487 + ,0 + ,71 + ,36 + ,136 + ,21054 + ,0 + ,4 + ,0 + ,0 + ,209641 + ,5 + ,62 + ,24 + ,88 + ,46698 + ,0 + ,14 + ,13 + ,52 + ,131698 + ,0 + ,60 + ,19 + ,75 + ,244749 + ,2 + ,98 + ,33 + ,124 + ,272458 + ,0 + ,100 + ,43 + ,162 + ,108043 + ,1 + ,45 + ,14 + ,54 + ,351067 + ,3 + ,136 + ,45 + ,170 + ,229242 + ,4 + ,63 + ,31 + ,120 + ,84207 + ,11 + ,14 + ,30 + ,112 + ,250047 + ,0 + ,41 + ,18 + ,71 + ,299775 + ,9 + ,91 + ,31 + ,120 + ,173260 + ,3 + ,41 + ,21 + ,79 + ,92499 + ,0 + ,25 + ,18 + ,71 + ,74408 + ,4 + ,29 + ,7 + ,28 + ,181633 + ,2 + ,47 + ,30 + ,110 + ,271856 + ,1 + ,109 + ,37 + ,147 + ,95227 + ,0 + ,37 + ,32 + ,111 + ,139942 + ,0 + ,54 + ,22 + ,88 + ,72880 + ,0 + ,14 + ,19 + ,76 + ,65475 + ,2 + ,16 + ,13 + ,51 + ,71965 + ,1 + ,32 + ,15 + ,59 + ,181528 + ,0 + ,32 + ,16 + ,61 + ,134019 + ,0 + ,32 + ,18 + ,67 + ,56375 + ,7 + ,10 + ,13 + ,49 + ,65490 + ,3 + ,27 + ,16 + ,62 + ,76302 + ,0 + ,29 + ,20 + ,76 + ,104011 + ,6 + ,25 + ,22 + ,88 + ,30989 + ,0 + ,5 + ,17 + ,68 + ,63123 + ,1 + ,34 + ,17 + ,68 + ,74914 + ,0 + ,35 + ,23 + ,90 + ,81437 + ,0 + ,37 + ,14 + ,54 + ,65745 + ,0 + ,26 + ,21 + ,77 + ,56653 + ,0 + ,38 + ,18 + ,68 + ,158399 + ,0 + ,23 + ,18 + ,72 + ,73624 + ,0 + ,30 + ,17 + ,64 + ,91899 + ,0 + ,18 + ,15 + ,59 + ,139526 + ,0 + ,28 + ,21 + ,84 + ,86678 + ,0 + ,12 + ,15 + ,59 + ,150580 + ,0 + ,27 + ,22 + ,83 + ,99611 + ,0 + ,41 + ,21 + ,81 + ,31706 + ,0 + ,26 + ,10 + ,32 + ,89806 + ,0 + ,27 + ,16 + ,62 + ,19764 + ,1 + ,10 + ,2 + ,8 + ,64187 + ,0 + ,10 + ,16 + ,61 + ,72535 + ,0 + ,17 + ,16 + ,64 + ,210907 + ,3 + ,79 + ,30 + ,115 + ,120982 + ,4 + ,58 + ,28 + ,109 + ,385534 + ,0 + ,121 + ,25 + ,96 + ,149061 + ,5 + ,43 + ,26 + ,100 + ,230964 + ,4 + ,102 + ,30 + ,116 + ,135473 + ,0 + ,82 + ,23 + ,88 + ,215147 + ,0 + ,101 + ,36 + ,135 + ,153935 + ,5 + ,50 + ,25 + ,89 + ,225548 + ,5 + ,81 + ,31 + ,118 + ,210767 + ,3 + ,94 + ,35 + ,135 + ,170266 + ,4 + ,44 + ,42 + ,154 + ,294424 + ,2 + ,107 + ,33 + ,127 + ,106408 + ,1 + ,33 + ,14 + ,46 + ,96560 + ,0 + ,42 + ,17 + ,54 + ,149112 + ,6 + ,56 + ,35 + ,128 + ,152871 + ,5 + ,59 + ,28 + ,97 + ,183167 + ,0 + ,91 + ,39 + ,149 + ,103597 + ,1 + ,27 + ,16 + ,60 + ,235800 + ,8 + ,105 + ,23 + ,84 + ,143246 + ,5 + ,67 + ,27 + ,105 + ,187681 + ,2 + ,114 + ,28 + ,107 + ,167488 + ,2 + ,69 + ,28 + ,104 + ,143756 + ,0 + ,105 + ,34 + ,132 + ,243199 + ,3 + ,88 + ,28 + ,108 + ,130585 + ,5 + ,67 + ,29 + ,109 + ,182079 + ,2 + ,124 + ,33 + ,124 + ,265318 + ,10 + ,110 + ,52 + ,199 + ,310839 + ,9 + ,130 + ,24 + ,91 + ,225060 + ,7 + ,93 + ,41 + ,158 + ,144966 + ,0 + ,39 + ,32 + ,122 + ,99466 + ,0 + ,28 + ,23 + ,91 + ,102010 + ,3 + ,28 + ,13 + ,50 + ,99923 + ,0 + ,44 + ,25 + ,99 + ,317394 + ,1 + ,116 + ,31 + ,117 + ,22648 + ,0 + ,12 + ,13 + ,39 + ,31414 + ,0 + ,18 + ,8 + ,25 + ,128423 + ,8 + ,32 + ,38 + ,145 + ,97839 + ,2 + ,25 + ,24 + ,87 + ,328107 + ,3 + ,129 + ,41 + ,159 + ,158015 + ,0 + ,59 + ,31 + ,119 + ,120445 + ,0 + ,36 + ,16 + ,59 + ,324598 + ,0 + ,113 + ,37 + ,136 + ,131069 + ,4 + ,47 + ,30 + ,107 + ,204271 + ,0 + ,92 + ,35 + ,130 + ,116048 + ,0 + ,50 + ,20 + ,75 + ,195838 + ,1 + ,111 + ,31 + ,116 + ,254488 + ,10 + ,120 + ,39 + ,150 + ,224330 + ,1 + ,131 + ,39 + ,144 + ,135781 + ,2 + ,45 + ,14 + ,47 + ,81240 + ,0 + ,58 + ,17 + ,68 + ,98146 + ,0 + ,15 + ,17 + ,68 + ,59194 + ,6 + ,7 + ,24 + ,80 + ,118612 + ,2 + ,54 + ,12 + ,48 + ,135131 + ,0 + ,38 + ,15 + ,60 + ,108446 + ,1 + ,22 + ,17 + ,68 + ,121848 + ,0 + ,37 + ,17 + ,64 + ,81872 + ,0 + ,32 + ,16 + ,64 + ,58981 + ,7 + ,0 + ,23 + ,91 + ,53515 + ,2 + ,5 + ,22 + ,88 + ,98104 + ,2 + ,55 + ,17 + ,66 + ,135458 + ,3 + ,43 + ,12 + ,48 + ,31774 + ,1 + ,0 + ,17 + ,66 + ,51567 + ,2 + ,21 + ,14 + ,56 + ,102538 + ,1 + ,50 + ,15 + ,58 + ,99373 + ,1 + ,12 + ,18 + ,72 + ,86230 + ,0 + ,21 + ,17 + ,61 + ,30837 + ,0 + ,8 + ,4 + ,15 + ,64175 + ,0 + ,37 + ,18 + ,72 + ,59382 + ,0 + ,29 + ,12 + ,41 + ,119308 + ,0 + ,32 + ,16 + ,61 + ,76702 + ,0 + ,35 + ,21 + ,67 + ,84105 + ,0 + ,17 + ,17 + ,66) + ,dim=c(5 + ,172) + ,dimnames=list(c('Tijd' + ,'Gedeelde_compendia' + ,'Aantal_blogs' + ,'Reviews' + ,'Reviews+120') + ,1:172)) > y <- array(NA,dim=c(5,172),dimnames=list(c('Tijd','Gedeelde_compendia','Aantal_blogs','Reviews','Reviews+120'),1:172)) > 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' > 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/wessaorg/rcomp/tmp/1vf3e1323770372.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > n <- length(y[,1]) > n [1] 5 > 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/wessaorg/rcomp/tmp/25jf21323770372.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) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = 2.7725, df = 170, p-value = 0.006184 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.06022849 0.34682880 sample estimates: cor 0.2079885 > 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) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 2: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 3: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 4: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 5: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 6: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 7: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 8: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 9: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 10: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/30vl31323770372.tab") > > try(system("convert tmp/1vf3e1323770372.ps tmp/1vf3e1323770372.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.035 0.131 1.160