R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(0 + ,255202 + ,64 + ,92 + ,34 + ,0 + ,135248 + ,59 + ,58 + ,30 + ,0 + ,207223 + ,64 + ,62 + ,42 + ,1 + ,189326 + ,95 + ,108 + ,34 + ,1 + ,141365 + ,46 + ,55 + ,25 + ,0 + ,65295 + ,27 + ,8 + ,31 + ,0 + ,439387 + ,103 + ,134 + ,29 + ,0 + ,33186 + ,19 + ,1 + ,18 + ,0 + ,183696 + ,51 + ,64 + ,30 + ,0 + ,186657 + ,38 + ,77 + ,29 + ,1 + ,276696 + ,99 + ,86 + ,42 + ,1 + ,194414 + ,98 + ,96 + ,50 + ,0 + ,141409 + ,59 + ,44 + ,33 + ,1 + ,306730 + ,68 + ,108 + ,46 + ,1 + ,192691 + ,74 + ,63 + ,38 + ,1 + ,333497 + ,164 + ,160 + ,52 + ,0 + ,261835 + ,59 + ,109 + ,32 + ,1 + ,263451 + ,130 + ,86 + ,35 + ,1 + ,157448 + ,49 + ,93 + ,25 + ,1 + ,232190 + ,73 + ,126 + ,42 + ,0 + ,245725 + ,64 + ,110 + ,40 + ,0 + ,388603 + ,92 + ,86 + ,35 + ,0 + ,156540 + ,34 + ,50 + ,25 + ,0 + ,156189 + ,47 + ,92 + ,46 + ,0 + ,189726 + ,106 + ,123 + ,39 + ,0 + ,192167 + ,106 + ,81 + ,35 + ,1 + ,249893 + ,122 + ,93 + ,38 + ,1 + ,236812 + ,76 + ,113 + ,35 + ,1 + ,143160 + ,47 + ,52 + ,28 + ,0 + ,259667 + ,54 + ,113 + ,37 + ,0 + ,243020 + ,68 + ,113 + ,40 + ,0 + ,176062 + ,67 + ,44 + ,42 + ,0 + ,286683 + ,79 + ,123 + ,44 + ,1 + ,87485 + ,33 + ,38 + ,33 + ,0 + ,329737 + ,88 + ,111 + ,38 + ,1 + ,247082 + ,51 + ,77 + ,37 + ,0 + ,378463 + ,108 + ,102 + ,41 + ,1 + ,191653 + ,75 + ,74 + ,32 + ,0 + ,114673 + ,31 + ,33 + ,17 + ,0 + ,301596 + ,167 + ,107 + ,39 + ,0 + ,284195 + ,73 + ,108 + ,33 + ,1 + ,155568 + ,60 + ,66 + ,35 + ,1 + ,177306 + ,67 + ,69 + ,32 + ,1 + ,144595 + ,51 + ,62 + ,35 + ,0 + ,140319 + ,73 + ,50 + ,45 + ,1 + ,405267 + ,135 + ,91 + ,38 + ,1 + ,78800 + ,42 + ,20 + ,26 + ,1 + ,201970 + ,69 + ,101 + ,45 + ,1 + ,302705 + ,101 + ,129 + ,44 + ,1 + ,164733 + ,50 + ,93 + ,40 + ,1 + ,194221 + ,68 + ,89 + ,33 + ,0 + ,24188 + ,24 + ,8 + ,4 + ,0 + ,346142 + ,288 + ,80 + ,41 + ,0 + ,65029 + ,17 + ,21 + ,18 + ,0 + ,101097 + ,64 + ,30 + ,14 + ,1 + ,253745 + ,51 + ,86 + ,36 + ,0 + ,273513 + ,77 + ,116 + ,49 + ,1 + ,282220 + ,160 + ,106 + ,32 + ,1 + ,280928 + ,120 + ,132 + ,37 + ,1 + ,214872 + ,74 + ,75 + ,32 + ,0 + ,342048 + ,127 + ,139 + ,43 + ,0 + ,273924 + ,108 + ,121 + ,25 + ,1 + ,195726 + ,92 + ,57 + ,42 + ,1 + ,231162 + ,80 + ,67 + ,37 + ,0 + ,209798 + ,61 + ,45 + ,33 + ,1 + ,201345 + ,60 + ,88 + ,28 + ,0 + ,180231 + ,118 + ,79 + ,31 + ,1 + ,204441 + ,129 + ,75 + ,40 + ,0 + ,197813 + ,67 + ,114 + ,32 + ,1 + ,136421 + ,60 + ,127 + ,25 + ,1 + ,216092 + ,59 + ,86 + ,42 + ,1 + ,73566 + ,32 + ,22 + ,23 + ,0 + ,213998 + ,70 + ,67 + ,42 + ,1 + ,181728 + ,50 + ,77 + ,38 + ,0 + ,148758 + ,51 + ,105 + ,34 + ,0 + ,308343 + ,71 + ,121 + ,39 + ,1 + ,251437 + ,78 + ,88 + ,32 + ,0 + ,202388 + ,102 + ,78 + ,37 + ,0 + ,173286 + ,56 + ,122 + ,34 + ,0 + ,155529 + ,58 + ,66 + ,33 + ,0 + ,132672 + ,41 + ,58 + ,25 + ,1 + ,390163 + ,102 + ,134 + ,45 + ,0 + ,145905 + ,66 + ,30 + ,26 + ,0 + ,228012 + ,88 + ,103 + ,40 + ,1 + ,80953 + ,25 + ,49 + ,8 + ,0 + ,130805 + ,47 + ,26 + ,27 + ,1 + ,135163 + ,49 + ,67 + ,32 + ,1 + ,333790 + ,168 + ,59 + ,37 + ,1 + ,271806 + ,95 + ,95 + ,50 + ,1 + ,164235 + ,99 + ,156 + ,41 + ,1 + ,234092 + ,80 + ,74 + ,37 + ,0 + ,207158 + ,69 + ,137 + ,38 + ,0 + ,156583 + ,57 + ,37 + ,28 + ,0 + ,242395 + ,68 + ,111 + ,36 + ,1 + ,261601 + ,70 + ,58 + ,32 + ,1 + ,178489 + ,35 + ,78 + ,32 + ,0 + ,204221 + ,44 + ,88 + ,33 + ,1 + ,268066 + ,69 + ,152 + ,35 + ,1 + ,327622 + ,133 + ,130 + ,58 + ,1 + ,361799 + ,101 + ,145 + ,27 + ,0 + ,247131 + ,107 + ,108 + ,45 + ,1 + ,265849 + ,58 + ,138 + ,37 + ,0 + ,162336 + ,162 + ,62 + ,32 + ,1 + ,43287 + ,14 + ,13 + ,19 + ,0 + ,172244 + ,68 + ,89 + ,22 + ,0 + ,189021 + ,121 + ,86 + ,35 + ,0 + ,227681 + ,43 + ,116 + ,36 + ,0 + ,269329 + ,81 + ,157 + ,36 + ,0 + ,106503 + ,56 + ,28 + ,23 + ,1 + ,117891 + ,77 + ,83 + ,40 + ,1 + ,287201 + ,59 + ,72 + ,40 + ,0 + ,266805 + ,78 + ,134 + ,42 + ,0 + ,23623 + ,11 + ,12 + ,1 + ,1 + ,174954 + ,69 + ,120 + ,36 + ,0 + ,61857 + ,25 + ,23 + ,11 + ,1 + ,144889 + ,43 + ,83 + ,40 + ,1 + ,347988 + ,103 + ,126 + ,34 + ,0 + ,21054 + ,16 + ,4 + ,0 + ,1 + ,224051 + ,46 + ,71 + ,27 + ,1 + ,31414 + ,19 + ,18 + ,8 + ,1 + ,278660 + ,107 + ,98 + ,35 + ,0 + ,209481 + ,58 + ,68 + ,44 + ,0 + ,156870 + ,75 + ,44 + ,40 + ,1 + ,112933 + ,46 + ,29 + ,28 + ,0 + ,38214 + ,34 + ,16 + ,8 + ,0 + ,166011 + ,35 + ,61 + ,36 + ,1 + ,316044 + ,73 + ,117 + ,47 + ,1 + ,181578 + ,56 + ,46 + ,48 + ,1 + ,358903 + ,72 + ,129 + ,45 + ,1 + ,275578 + ,91 + ,139 + ,48 + ,1 + ,368796 + ,106 + ,136 + ,49 + ,1 + ,172464 + ,31 + ,66 + ,35 + ,1 + ,94381 + ,35 + ,42 + ,32 + ,1 + ,250563 + ,290 + ,75 + ,36 + ,1 + ,382499 + ,154 + ,97 + ,42 + ,1 + ,118010 + ,42 + ,49 + ,35 + ,1 + ,365575 + ,122 + ,127 + ,42 + ,1 + ,147989 + ,72 + ,55 + ,34 + ,1 + ,231681 + ,46 + ,101 + ,41 + ,0 + ,193119 + ,77 + ,80 + ,36 + ,0 + ,189020 + ,108 + ,29 + ,32 + ,0 + ,341958 + ,106 + ,95 + ,33 + ,1 + ,222060 + ,79 + ,120 + ,35 + ,0 + ,173260 + ,63 + ,41 + ,21 + ,0 + ,274787 + ,91 + ,128 + ,42 + ,1 + ,130908 + ,52 + ,142 + ,49 + ,0 + ,204009 + ,75 + ,88 + ,33 + ,0 + ,262412 + ,94 + ,170 + ,39 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,14688 + ,10 + ,4 + ,0 + ,0 + ,98 + ,1 + ,0 + ,0 + ,0 + ,455 + ,2 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,195765 + ,75 + ,56 + ,33 + ,0 + ,334258 + ,129 + ,121 + ,47 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,4 + ,0 + ,0 + ,0 + ,7199 + ,5 + ,7 + ,0 + ,1 + ,46660 + ,20 + ,12 + ,5 + ,1 + ,17547 + ,5 + ,0 + ,1 + ,0 + ,107465 + ,38 + ,37 + ,38 + ,1 + ,969 + ,2 + ,0 + ,0 + ,1 + ,179994 + ,58 + ,47 + ,28) + ,dim=c(5 + ,164) + ,dimnames=list(c('Geslacht' + ,'Time_in_RFC' + ,'Logins' + ,'Blogged_computations' + ,'Reviewed_compendiums') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('Geslacht','Time_in_RFC','Logins','Blogged_computations','Reviewed_compendiums'),1:164)) > 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' > 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/fisher/rcomp/tmp/1ef9v1355163712.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/2sbi51355163712.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 = 1.6707, p-value = 0.09478 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1071835 > 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/fisher/rcomp/tmp/3rcvo1355163712.tab") > > try(system("convert tmp/1ef9v1355163712.ps tmp/1ef9v1355163712.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.495 0.256 1.742