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 + ,32033 + ,165 + ,165 + ,130 + ,279055 + ,110459 + ,113854 + ,20654 + ,135 + ,132 + ,143 + ,212408 + ,105079 + ,99776 + ,16346 + ,121 + ,121 + ,118 + ,233939 + ,112098 + ,106194 + ,35926 + ,148 + ,145 + ,146 + ,222117 + ,43929 + ,100792 + ,10621 + ,73 + ,71 + ,73 + ,179751 + ,76173 + ,47552 + ,10024 + ,49 + ,47 + ,89 + ,70849 + ,187326 + ,250931 + ,43068 + ,185 + ,177 + ,146 + ,599777 + ,22807 + ,6853 + ,1271 + ,5 + ,5 + ,22 + ,33186 + ,144408 + ,115466 + ,34416 + ,125 + ,124 + ,132 + ,227332 + ,66485 + ,110896 + ,20318 + ,93 + ,92 + ,92 + ,258874 + ,79089 + ,169351 + ,24409 + ,154 + ,149 + ,147 + ,359064 + ,81625 + ,94853 + ,20648 + ,98 + ,93 + ,203 + ,264989 + ,68788 + ,72591 + ,12347 + ,70 + ,70 + ,113 + ,209202 + ,103297 + ,101345 + ,21857 + ,148 + ,148 + ,171 + ,368577 + ,69446 + ,113713 + ,11034 + ,100 + ,100 + ,87 + ,269455 + ,114948 + ,165354 + ,33433 + ,150 + ,142 + ,208 + ,397286 + ,167949 + ,164263 + ,35902 + ,197 + ,194 + ,153 + ,335567 + ,125081 + ,135213 + ,22355 + ,114 + ,113 + ,97 + ,428322 + ,125818 + ,111669 + ,31219 + ,169 + ,162 + ,95 + ,182016 + ,136588 + ,134163 + ,21983 + ,200 + ,186 + ,197 + ,267365 + ,112431 + ,140303 + ,40085 + ,148 + ,147 + ,160 + ,279428 + ,103037 + ,150773 + ,18507 + ,140 + ,137 + ,148 + ,508849 + ,82317 + ,111848 + ,16278 + ,74 + ,71 + ,84 + ,206722 + ,118906 + ,102509 + ,24662 + ,128 + ,123 + ,227 + ,200004 + ,83515 + ,96785 + ,31452 + ,140 + ,134 + ,154 + ,257139 + ,104581 + ,116136 + ,32580 + ,116 + ,115 + ,151 + ,270941 + ,103129 + ,158376 + ,22883 + ,147 + ,138 + ,142 + ,296850 + ,83243 + ,153990 + ,27652 + ,132 + ,125 + ,148 + ,329962 + ,37110 + ,64057 + ,9845 + ,70 + ,66 + ,110 + ,187155 + ,113344 + ,230054 + ,20190 + ,144 + ,137 + ,149 + ,393860 + ,139165 + ,184531 + ,46201 + ,155 + ,152 + ,179 + ,327660 + ,86652 + ,114198 + ,10971 + ,165 + ,159 + ,149 + ,269239 + ,112302 + ,198299 + ,34811 + ,161 + ,159 + ,187 + ,386982 + ,69652 + ,33750 + ,3029 + ,31 + ,31 + ,153 + ,130446 + ,119442 + ,189723 + ,38941 + ,199 + ,185 + ,163 + ,430118 + ,69867 + ,100826 + ,4958 + ,78 + ,78 + ,127 + ,273950 + ,101629 + ,188355 + ,32344 + ,121 + ,117 + ,151 + ,428077 + ,70168 + ,104470 + ,19433 + ,112 + ,109 + ,100 + ,254312 + ,31081 + ,58391 + ,12558 + ,41 + ,41 + ,46 + ,120351 + ,103925 + ,164808 + ,36524 + ,158 + ,149 + ,156 + ,395643 + ,92622 + ,134097 + ,26041 + ,123 + ,123 + ,128 + ,345875 + ,79011 + ,80238 + ,16637 + ,104 + ,103 + ,111 + ,212715 + ,93487 + ,133252 + ,28395 + ,94 + ,87 + ,119 + ,224524 + ,64520 + ,54518 + ,16747 + ,73 + ,71 + ,148 + ,182485 + ,93473 + ,121850 + ,9105 + ,52 + ,51 + ,65 + ,157164 + ,114360 + ,79367 + ,11941 + ,71 + ,70 + ,134 + ,459455 + ,33032 + ,56968 + ,7935 + ,21 + ,21 + ,66 + ,78800 + ,96125 + ,106314 + ,19499 + ,155 + ,155 + ,201 + ,217932 + ,151911 + ,191889 + ,22938 + ,174 + ,172 + ,177 + ,368086 + ,89256 + ,104864 + ,25314 + ,136 + ,133 + ,156 + ,228688 + ,95676 + ,160792 + ,28527 + ,128 + ,125 + ,158 + ,244765 + ,5950 + ,15049 + ,2694 + ,7 + ,7 + ,7 + ,24188 + ,149695 + ,191179 + ,20867 + ,165 + ,158 + ,175 + ,400109 + ,32551 + ,25109 + ,3597 + ,21 + ,21 + ,61 + ,65029 + ,31701 + ,45824 + ,5296 + ,35 + ,35 + ,41 + ,101097 + ,100087 + ,129711 + ,32982 + ,137 + ,133 + ,133 + ,305666 + ,169707 + ,210012 + ,38975 + ,174 + ,169 + ,228 + ,369627 + ,150491 + ,194679 + ,42721 + ,257 + ,256 + ,140 + ,367127 + ,120192 + ,197680 + ,41455 + ,207 + ,190 + ,155 + ,377704 + ,95893 + ,81180 + ,23923 + ,103 + ,100 + ,141 + ,280106 + ,151715 + ,197765 + ,26719 + ,171 + ,171 + ,181 + ,400971 + ,176225 + ,214738 + ,53405 + ,279 + ,267 + ,75 + ,315924 + ,59900 + ,96252 + ,12526 + ,83 + ,80 + ,97 + ,291391 + ,104767 + ,124527 + ,26584 + ,130 + ,126 + ,142 + ,295075 + ,114799 + ,153242 + ,37062 + ,131 + ,132 + ,136 + ,280018 + ,72128 + ,145707 + ,25696 + ,126 + ,121 + ,87 + ,267432 + ,143592 + ,113963 + ,24634 + ,158 + ,156 + ,140 + ,217181 + ,89626 + ,134904 + ,27269 + ,138 + ,133 + ,169 + ,258166 + ,131072 + ,114268 + ,25270 + ,200 + ,199 + ,129 + ,260919 + ,126817 + ,94333 + ,24634 + ,104 + ,98 + ,92 + ,182961 + ,81351 + ,102204 + ,17828 + ,111 + ,109 + ,160 + ,256967 + ,22618 + ,23824 + ,3007 + ,26 + ,25 + ,67 + ,73566 + ,88977 + ,111563 + ,20065 + ,115 + ,113 + ,179 + ,272362 + ,92059 + ,91313 + ,24648 + ,127 + ,126 + ,90 + ,229056 + ,81897 + ,89770 + ,21588 + ,140 + ,137 + ,144 + ,229851 + ,108146 + ,100125 + ,25217 + ,121 + ,121 + ,144 + ,371391 + ,126372 + ,165278 + ,30927 + ,183 + ,178 + ,144 + ,398210 + ,249771 + ,181712 + ,18487 + ,68 + ,63 + ,134 + ,220419 + ,71154 + ,80906 + ,18050 + ,112 + ,109 + ,146 + ,231884 + ,71571 + ,75881 + ,17696 + ,103 + ,101 + ,121 + ,217714 + ,55918 + ,83963 + ,17326 + ,63 + ,61 + ,112 + ,200046 + ,160141 + ,175721 + ,39361 + ,166 + ,157 + ,145 + ,483074 + ,38692 + ,68580 + ,9648 + ,38 + ,38 + ,99 + ,145943 + ,102812 + ,136323 + ,26759 + ,163 + ,159 + ,96 + ,295224 + ,56622 + ,55792 + ,7905 + ,59 + ,58 + ,27 + ,80953 + ,15986 + ,25157 + ,4527 + ,27 + ,27 + ,77 + ,217384 + ,123534 + ,100922 + ,41517 + ,108 + ,108 + ,137 + ,179344 + ,108535 + ,118845 + ,21261 + ,88 + ,83 + ,151 + ,415550 + ,93879 + ,170492 + ,36099 + ,92 + ,88 + ,126 + ,389059 + ,144551 + ,81716 + ,39039 + ,170 + ,164 + ,159 + ,180679 + ,56750 + ,115750 + ,13841 + ,98 + ,96 + ,101 + ,299505 + ,127654 + ,105590 + ,23841 + ,205 + ,192 + ,144 + ,292260 + ,65594 + ,92795 + ,8589 + ,96 + ,94 + ,102 + ,199481 + ,59938 + ,82390 + ,15049 + ,107 + ,107 + ,135 + ,282361 + ,146975 + ,135599 + ,39038 + ,150 + ,144 + ,147 + ,329281 + ,165904 + ,127667 + ,36774 + ,138 + ,136 + ,155 + ,234577 + ,169265 + ,163073 + ,40076 + ,177 + ,171 + ,138 + ,297995 + ,183500 + ,211381 + ,43840 + ,213 + ,210 + ,113 + ,329583 + ,165986 + ,189944 + ,43146 + ,208 + ,193 + ,248 + ,416463 + ,184923 + ,226168 + ,50099 + ,307 + ,297 + ,116 + ,415683 + ,140358 + ,117495 + ,40312 + ,125 + ,125 + ,176 + ,297080 + ,149959 + ,195894 + ,32616 + ,208 + ,204 + ,140 + ,318283 + ,57224 + ,80684 + ,11338 + ,73 + ,70 + ,59 + ,224033 + ,43750 + ,19630 + ,7409 + ,49 + ,49 + ,64 + ,43287 + ,48029 + ,88634 + ,18213 + ,82 + ,82 + ,40 + ,238089 + ,104978 + ,139292 + ,45873 + ,206 + ,205 + ,98 + ,263322 + ,100046 + ,128602 + ,39844 + ,112 + ,111 + ,139 + ,299566 + ,101047 + ,135848 + ,28317 + ,139 + ,135 + ,135 + ,321797 + ,197426 + ,178377 + ,24797 + ,60 + ,59 + ,97 + ,193926 + ,160902 + ,106330 + ,7471 + ,70 + ,70 + ,142 + ,170491 + ,147172 + ,178303 + ,27259 + ,112 + ,108 + ,155 + ,354041 + ,109432 + ,116938 + ,23201 + ,142 + ,141 + ,115 + ,303273 + ,1168 + ,5841 + ,238 + ,11 + ,11 + ,0 + ,23668 + ,83248 + ,106020 + ,28830 + ,130 + ,130 + ,103 + ,196743 + ,25162 + ,24610 + ,3913 + ,31 + ,28 + ,30 + ,61857 + ,45724 + ,74151 + ,9935 + ,132 + ,101 + ,130 + ,217543 + ,110529 + ,232241 + ,27738 + ,219 + ,216 + ,102 + ,440711 + ,855 + ,6622 + ,338 + ,4 + ,4 + ,0 + ,21054 + ,101382 + ,127097 + ,13326 + ,102 + ,97 + ,77 + ,252805 + ,14116 + ,13155 + ,3988 + ,39 + ,39 + ,9 + ,31961 + ,89506 + ,160501 + ,24347 + ,125 + ,119 + ,150 + ,360436 + ,135356 + ,91502 + ,27111 + ,121 + ,118 + ,163 + ,251948 + ,116066 + ,24469 + ,3938 + ,42 + ,41 + ,148 + ,187003 + ,144244 + ,88229 + ,17416 + ,111 + ,107 + ,94 + ,180842 + ,8773 + ,13983 + ,1888 + ,16 + ,16 + ,21 + ,38214 + ,102153 + ,80716 + ,18700 + ,70 + ,69 + ,151 + ,278173 + ,117440 + ,157384 + ,36809 + ,162 + ,160 + ,187 + ,358276 + ,104128 + ,122975 + ,24959 + ,173 + ,158 + ,171 + ,211775 + ,134238 + ,191469 + ,37343 + ,171 + ,161 + ,170 + ,445926 + ,134047 + ,231257 + ,21849 + ,172 + ,165 + ,145 + ,348017 + ,279488 + ,258287 + ,49809 + ,254 + ,246 + ,198 + ,441946 + ,79756 + ,122531 + ,21654 + ,90 + ,89 + ,152 + ,215177 + ,66089 + ,61394 + ,8728 + ,50 + ,49 + ,112 + ,126320 + ,102070 + ,86480 + ,20920 + ,113 + ,107 + ,173 + ,316128 + ,146760 + ,195791 + ,27195 + ,187 + ,182 + ,177 + ,466139 + ,154771 + ,18284 + ,1037 + ,16 + ,16 + ,153 + ,162279 + ,165933 + ,147581 + ,42570 + ,175 + ,173 + ,161 + ,416643 + ,64593 + ,72558 + ,17672 + ,90 + ,90 + ,115 + ,178322 + ,92280 + ,147341 + ,34245 + ,140 + ,140 + ,147 + ,292443 + ,67150 + ,114651 + ,16786 + ,145 + ,142 + ,124 + ,283913 + ,128692 + ,100187 + ,20954 + ,141 + ,126 + ,57 + ,244802 + ,124089 + ,130332 + ,16378 + ,125 + ,123 + ,144 + ,387072 + ,125386 + ,134218 + ,31852 + ,241 + ,239 + ,126 + ,246963 + ,37238 + ,10901 + ,2805 + ,16 + ,15 + ,78 + ,173260 + ,140015 + ,145758 + ,38086 + ,175 + ,170 + ,153 + ,346748 + ,150047 + ,75767 + ,21166 + ,132 + ,123 + ,196 + ,176654 + ,154451 + ,134969 + ,34672 + ,154 + ,151 + ,130 + ,267742 + ,156349 + ,169216 + ,36171 + ,198 + ,194 + ,159 + ,314070) + ,dim=c(7 + ,148) + ,dimnames=list(c('Y1' + ,'X1' + ,'X2' + ,'X3' + ,'X4' + ,'X5' + ,'X6') + ,1:148)) > y <- array(NA,dim=c(7,148),dimnames=list(c('Y1','X1','X2','X3','X4','X5','X6'),1:148)) > 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: 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/17zv81324640221.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] 7 > 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/21f5v1324640221.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 = 13.0626, df = 146, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.6497030 0.8006128 sample estimates: cor 0.7340949 > 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 18 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/31pig1324640221.tab") > > try(system("convert tmp/17zv81324640221.ps tmp/17zv81324640221.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.456 0.118 1.563