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(140824 + ,186099 + ,165 + ,0 + ,474 + ,38 + ,144 + ,83899 + ,110459 + ,113854 + ,132 + ,3 + ,421 + ,34 + ,133 + ,62711 + ,105079 + ,99776 + ,121 + ,0 + ,673 + ,42 + ,162 + ,122597 + ,112098 + ,106194 + ,145 + ,3 + ,1137 + ,38 + ,148 + ,112249 + ,43929 + ,100792 + ,71 + ,2 + ,333 + ,27 + ,88 + ,56414 + ,76173 + ,47552 + ,47 + ,2 + ,179 + ,35 + ,129 + ,23297 + ,187326 + ,250931 + ,177 + ,8 + ,2146 + ,33 + ,128 + ,231677 + ,22807 + ,6853 + ,5 + ,0 + ,111 + ,18 + ,67 + ,26333 + ,144408 + ,115466 + ,124 + ,1 + ,735 + ,34 + ,132 + ,92356 + ,66485 + ,110896 + ,92 + ,1 + ,585 + ,33 + ,120 + ,100802 + ,79089 + ,169351 + ,149 + ,5 + ,754 + ,42 + ,155 + ,123523 + ,81625 + ,94853 + ,93 + ,5 + ,650 + ,55 + ,210 + ,141038 + ,68788 + ,72591 + ,70 + ,0 + ,615 + ,35 + ,115 + ,84032 + ,103297 + ,101345 + ,148 + ,0 + ,1117 + ,52 + ,179 + ,242821 + ,69446 + ,113713 + ,100 + ,0 + ,599 + ,42 + ,158 + ,98074 + ,114948 + ,165354 + ,142 + ,8 + ,1638 + ,59 + ,223 + ,204399 + ,167949 + ,164263 + ,194 + ,3 + ,724 + ,36 + ,140 + ,127837 + ,125081 + ,135213 + ,113 + ,1 + ,1139 + ,39 + ,144 + ,179805 + ,125818 + ,111669 + ,162 + ,7 + ,491 + ,29 + ,111 + ,57017 + ,136588 + ,134163 + ,186 + ,14 + ,675 + ,46 + ,179 + ,121853 + ,112431 + ,140303 + ,147 + ,1 + ,819 + ,45 + ,171 + ,128937 + ,103037 + ,150773 + ,137 + ,3 + ,1203 + ,39 + ,144 + ,274771 + ,82317 + ,111848 + ,71 + ,3 + ,421 + ,25 + ,89 + ,50114 + ,118906 + ,102509 + ,123 + ,5 + ,601 + ,52 + ,208 + ,87388 + ,83515 + ,96785 + ,134 + ,6 + ,1156 + ,41 + ,153 + ,103760 + ,104581 + ,116136 + ,115 + ,1 + ,923 + ,38 + ,146 + ,87587 + ,103129 + ,158376 + ,138 + ,9 + ,1061 + ,41 + ,158 + ,108822 + ,83243 + ,153990 + ,125 + ,7 + ,593 + ,39 + ,142 + ,109222 + ,37110 + ,64057 + ,66 + ,4 + ,559 + ,32 + ,117 + ,91858 + ,113344 + ,230054 + ,137 + ,7 + ,1016 + ,41 + ,158 + ,96751 + ,139165 + ,184531 + ,152 + ,3 + ,886 + ,45 + ,175 + ,87130 + ,86652 + ,114198 + ,159 + ,6 + ,605 + ,47 + ,174 + ,82994 + ,112302 + ,198299 + ,159 + ,2 + ,779 + ,48 + ,185 + ,120264 + ,69652 + ,33750 + ,31 + ,0 + ,310 + ,37 + ,141 + ,63967 + ,119442 + ,189723 + ,185 + ,14 + ,1135 + ,39 + ,151 + ,157208 + ,69867 + ,100826 + ,78 + ,0 + ,1186 + ,42 + ,159 + ,173124 + ,101629 + ,188355 + ,117 + ,4 + ,1287 + ,41 + ,151 + ,223454 + ,70168 + ,104470 + ,109 + ,3 + ,585 + ,36 + ,139 + ,103722 + ,31081 + ,58391 + ,41 + ,0 + ,276 + ,17 + ,55 + ,57078 + ,103925 + ,164808 + ,149 + ,9 + ,1139 + ,39 + ,151 + ,163531 + ,92622 + ,134097 + ,123 + ,0 + ,1490 + ,39 + ,145 + ,190081 + ,79011 + ,80238 + ,103 + ,1 + ,590 + ,38 + ,138 + ,77659 + ,93487 + ,133252 + ,87 + ,7 + ,632 + ,36 + ,115 + ,59631 + ,64520 + ,54518 + ,71 + ,2 + ,464 + ,42 + ,157 + ,118932 + ,93473 + ,121850 + ,51 + ,1 + ,1022 + ,45 + ,73 + ,31928 + ,114360 + ,79367 + ,70 + ,1 + ,2005 + ,38 + ,138 + ,366195 + ,33032 + ,56968 + ,21 + ,0 + ,330 + ,26 + ,82 + ,21832 + ,96125 + ,106314 + ,155 + ,0 + ,648 + ,52 + ,201 + ,101737 + ,151911 + ,191889 + ,172 + ,2 + ,1305 + ,47 + ,181 + ,131263 + ,89256 + ,104864 + ,133 + ,3 + ,868 + ,45 + ,164 + ,70659 + ,95671 + ,160791 + ,125 + ,3 + ,554 + ,40 + ,158 + ,52259 + ,5950 + ,15049 + ,7 + ,0 + ,218 + ,4 + ,12 + ,9139 + ,149695 + ,191179 + ,158 + ,7 + ,832 + ,44 + ,163 + ,181046 + ,32551 + ,25109 + ,21 + ,0 + ,255 + ,18 + ,67 + ,39920 + ,31701 + ,45824 + ,35 + ,0 + ,454 + ,14 + ,52 + ,55273 + ,100087 + ,129711 + ,133 + ,4 + ,1074 + ,37 + ,134 + ,139882 + ,169707 + ,210012 + ,169 + ,5 + ,642 + ,56 + ,210 + ,92206 + ,150491 + ,194679 + ,256 + ,1 + ,1057 + ,36 + ,134 + ,121210 + ,120192 + ,197680 + ,190 + ,17 + ,992 + ,41 + ,150 + ,124866 + ,95893 + ,81180 + ,100 + ,3 + ,814 + ,36 + ,139 + ,165693 + ,151715 + ,197765 + ,171 + ,0 + ,1288 + ,46 + ,178 + ,162900 + ,176225 + ,214738 + ,267 + ,12 + ,1128 + ,28 + ,101 + ,81448 + ,59900 + ,96252 + ,80 + ,3 + ,1061 + ,42 + ,165 + ,136139 + ,104767 + ,124527 + ,126 + ,4 + ,897 + ,42 + ,163 + ,130023 + ,114799 + ,153242 + ,132 + ,-1 + ,557 + ,37 + ,139 + ,75353 + ,72128 + ,145707 + ,121 + ,5 + ,436 + ,30 + ,116 + ,70320 + ,143592 + ,113963 + ,156 + ,2 + ,562 + ,35 + ,137 + ,73996 + ,89626 + ,134904 + ,133 + ,5 + ,799 + ,44 + ,167 + ,92795 + ,131072 + ,114268 + ,199 + ,1 + ,826 + ,36 + ,135 + ,115430 + ,126817 + ,94333 + ,98 + ,6 + ,600 + ,28 + ,102 + ,72458 + ,81351 + ,102204 + ,109 + ,2 + ,863 + ,45 + ,173 + ,137073 + ,22618 + ,23824 + ,25 + ,1 + ,385 + ,23 + ,88 + ,49742 + ,88977 + ,111563 + ,113 + ,2 + ,712 + ,45 + ,175 + ,130935 + ,92059 + ,91313 + ,126 + ,1 + ,705 + ,38 + ,133 + ,95854 + ,81897 + ,89770 + ,137 + ,3 + ,606 + ,38 + ,148 + ,88511 + ,108146 + ,100125 + ,121 + ,0 + ,965 + ,42 + ,157 + ,248935 + ,126372 + ,165278 + ,178 + ,5 + ,992 + ,36 + ,140 + ,157848 + ,249771 + ,181712 + ,63 + ,5 + ,522 + ,41 + ,154 + ,24347 + ,71154 + ,80906 + ,109 + ,3 + ,648 + ,38 + ,148 + ,104064 + ,71571 + ,75881 + ,101 + ,2 + ,588 + ,37 + ,134 + ,93109 + ,55918 + ,83963 + ,61 + ,2 + ,622 + ,28 + ,109 + ,69650 + ,160141 + ,175721 + ,157 + ,9 + ,1197 + ,45 + ,175 + ,253760 + ,38692 + ,68580 + ,38 + ,0 + ,651 + ,26 + ,99 + ,77339 + ,102812 + ,136323 + ,159 + ,4 + ,656 + ,44 + ,122 + ,144020 + ,56622 + ,55792 + ,58 + ,1 + ,437 + ,8 + ,28 + ,25161 + ,15986 + ,25157 + ,27 + ,0 + ,792 + ,27 + ,101 + ,122949 + ,123534 + ,100922 + ,108 + ,0 + ,342 + ,35 + ,129 + ,45855 + ,108535 + ,118845 + ,83 + ,5 + ,1353 + ,37 + ,143 + ,217209 + ,93879 + ,170492 + ,88 + ,4 + ,891 + ,57 + ,206 + ,136994 + ,144551 + ,81716 + ,164 + ,6 + ,1038 + ,41 + ,155 + ,96779 + ,56750 + ,115750 + ,96 + ,2 + ,786 + ,37 + ,138 + ,135716 + ,127654 + ,105590 + ,192 + ,13 + ,618 + ,38 + ,141 + ,125371 + ,65594 + ,92795 + ,94 + ,2 + ,545 + ,31 + ,114 + ,82449 + ,59938 + ,82390 + ,107 + ,0 + ,1061 + ,36 + ,140 + ,179104 + ,146975 + ,135599 + ,144 + ,6 + ,928 + ,36 + ,140 + ,166284 + ,143372 + ,111542 + ,123 + ,0 + ,555 + ,36 + ,140 + ,77710 + ,168553 + ,162519 + ,170 + ,6 + ,552 + ,35 + ,127 + ,59985 + ,183500 + ,211381 + ,210 + ,3 + ,741 + ,39 + ,141 + ,66789 + ,165986 + ,189944 + ,193 + ,15 + ,1251 + ,58 + ,223 + ,177779 + ,184923 + ,226168 + ,297 + ,10 + ,1389 + ,30 + ,114 + ,166178 + ,140358 + ,117495 + ,125 + ,0 + ,833 + ,51 + ,198 + ,167160 + ,149959 + ,195894 + ,204 + ,4 + ,812 + ,41 + ,155 + ,77748 + ,57224 + ,80684 + ,70 + ,3 + ,640 + ,36 + ,138 + ,106172 + ,43750 + ,19630 + ,49 + ,0 + ,214 + ,19 + ,71 + ,23657 + ,48029 + ,88634 + ,82 + ,0 + ,713 + ,23 + ,84 + ,96668 + ,104978 + ,139292 + ,205 + ,1 + ,686 + ,40 + ,151 + ,63796 + ,100046 + ,128602 + ,111 + ,1 + ,1140 + ,40 + ,155 + ,131090 + ,101047 + ,135848 + ,135 + ,4 + ,1028 + ,40 + ,150 + ,165608 + ,197426 + ,178377 + ,59 + ,1 + ,349 + ,30 + ,112 + ,-58408 + ,160902 + ,106330 + ,70 + ,0 + ,892 + ,41 + ,161 + ,46698 + ,147172 + ,178303 + ,108 + ,4 + ,606 + ,40 + ,149 + ,128649 + ,109432 + ,116938 + ,141 + ,1 + ,682 + ,45 + ,164 + ,180869 + ,1168 + ,5841 + ,11 + ,0 + ,156 + ,1 + ,0 + ,17782 + ,83248 + ,106020 + ,130 + ,0 + ,656 + ,36 + ,139 + ,69512 + ,25162 + ,24610 + ,28 + ,3 + ,192 + ,11 + ,32 + ,37247 + ,45724 + ,74151 + ,101 + ,31 + ,457 + ,45 + ,169 + ,89615 + ,110529 + ,232241 + ,216 + ,3 + ,1162 + ,38 + ,140 + ,151812 + ,855 + ,6622 + ,4 + ,0 + ,146 + ,0 + ,0 + ,14432 + ,101382 + ,127097 + ,97 + ,5 + ,866 + ,30 + ,111 + ,125708 + ,14116 + ,13155 + ,39 + ,0 + ,200 + ,8 + ,25 + ,18806 + ,89506 + ,160501 + ,119 + ,6 + ,1163 + ,39 + ,146 + ,134108 + ,135356 + ,91502 + ,118 + ,3 + ,693 + ,46 + ,175 + ,143567 + ,116066 + ,24469 + ,41 + ,1 + ,485 + ,48 + ,181 + ,150393 + ,144244 + ,88229 + ,107 + ,4 + ,670 + ,29 + ,107 + ,63814 + ,8773 + ,13983 + ,16 + ,0 + ,276 + ,8 + ,27 + ,24231 + ,102153 + ,80716 + ,69 + ,1 + ,646 + ,39 + ,147 + ,108735 + ,117440 + ,157384 + ,160 + ,2 + ,993 + ,47 + ,178 + ,187418 + ,104128 + ,122975 + ,158 + ,15 + ,441 + ,50 + ,193 + ,67968 + ,134238 + ,191469 + ,161 + ,10 + ,1548 + ,48 + ,187 + ,204691 + ,134047 + ,231257 + ,165 + ,7 + ,819 + ,48 + ,187 + ,82955 + ,279488 + ,258287 + ,246 + ,8 + ,1151 + ,50 + ,186 + ,138425 + ,79756 + ,122531 + ,89 + ,1 + ,473 + ,40 + ,151 + ,65461 + ,66089 + ,61394 + ,49 + ,1 + ,401 + ,36 + ,131 + ,41030 + ,102070 + ,86480 + ,107 + ,6 + ,943 + ,40 + ,155 + ,196912 + ,146760 + ,195791 + ,182 + ,5 + ,1429 + ,46 + ,172 + ,205469 + ,154771 + ,18284 + ,16 + ,0 + ,529 + ,39 + ,148 + ,117652 + ,165933 + ,147581 + ,173 + ,2 + ,1654 + ,42 + ,156 + ,225565 + ,64593 + ,72558 + ,90 + ,0 + ,689 + ,39 + ,143 + ,84871 + ,92280 + ,147341 + ,140 + ,0 + ,528 + ,41 + ,151 + ,89029 + ,67150 + ,114651 + ,142 + ,3 + ,873 + ,42 + ,145 + ,144308 + ,128692 + ,100187 + ,126 + ,15 + ,601 + ,32 + ,125 + ,114151 + ,124089 + ,130332 + ,123 + ,2 + ,1545 + ,39 + ,145 + ,232822 + ,125386 + ,134218 + ,239 + ,2 + ,747 + ,36 + ,133 + ,98121 + ,37238 + ,10901 + ,15 + ,1 + ,716 + ,21 + ,79 + ,162359 + ,140015 + ,145758 + ,170 + ,5 + ,940 + ,45 + ,174 + ,171918 + ,150047 + ,75767 + ,123 + ,9 + ,720 + ,50 + ,192 + ,93227 + ,154451 + ,134969 + ,151 + ,3 + ,980 + ,36 + ,132 + ,98324 + ,156349 + ,169216 + ,194 + ,4 + ,815 + ,44 + ,159 + ,132369 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,6023 + ,7953 + ,5 + ,0 + ,85 + ,0 + ,0 + ,6735 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,98 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,105406 + ,122 + ,3 + ,662 + ,37 + ,133 + ,111397 + ,68946 + ,174586 + ,173 + ,1 + ,1041 + ,47 + ,185 + ,190644 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,1644 + ,4245 + ,6 + ,0 + ,74 + ,0 + ,0 + ,2954 + ,6179 + ,21509 + ,13 + ,0 + ,259 + ,5 + ,15 + ,25151 + ,3926 + ,7670 + ,3 + ,0 + ,69 + ,1 + ,4 + ,9877 + ,52789 + ,15673 + ,35 + ,0 + ,285 + ,43 + ,152 + ,101005 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,969 + ,100350 + ,75882 + ,72 + ,8 + ,573 + ,31 + ,113 + ,119710) + ,dim=c(8 + ,164) + ,dimnames=list(c('Y' + ,'X1' + ,'X2' + ,'X3' + ,'X4' + ,'X5' + ,'X6' + ,'X7') + ,1:164)) > y <- array(NA,dim=c(8,164),dimnames=list(c('Y','X1','X2','X3','X4','X5','X6','X7'),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' > #'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/wessaorg/rcomp/tmp/1dufo1324042238.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] 8 > 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/28jpt1324042238.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 = 11.0105, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5804468 > 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 28 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/38nun1324042238.tab") > > try(system("convert tmp/1dufo1324042238.ps tmp/1dufo1324042238.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.025 0.155 2.389