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(493 + ,797 + ,335 + ,113 + ,514 + ,840 + ,342 + ,113 + ,522 + ,988 + ,341 + ,113 + ,490 + ,819 + ,336 + ,113 + ,484 + ,831 + ,326 + ,113 + ,506 + ,904 + ,324 + ,113 + ,501 + ,814 + ,318 + ,114 + ,462 + ,798 + ,314 + ,114 + ,465 + ,828 + ,309 + ,114 + ,454 + ,789 + ,304 + ,114 + ,464 + ,930 + ,303 + ,114 + ,427 + ,744 + ,305 + ,114 + ,460 + ,832 + ,304 + ,115 + ,473 + ,826 + ,307 + ,115 + ,465 + ,907 + ,304 + ,115 + ,422 + ,776 + ,295 + ,116 + ,415 + ,835 + ,287 + ,116 + ,413 + ,715 + ,279 + ,116 + ,420 + ,729 + ,272 + ,116 + ,363 + ,733 + ,267 + ,116 + ,376 + ,736 + ,260 + ,116 + ,380 + ,712 + ,254 + ,116 + ,384 + ,711 + ,251 + ,116 + ,346 + ,667 + ,249 + ,116 + ,389 + ,799 + ,251 + ,117 + ,407 + ,661 + ,248 + ,117 + ,393 + ,692 + ,238 + ,117 + ,346 + ,649 + ,226 + ,118 + ,348 + ,729 + ,217 + ,118 + ,353 + ,622 + ,211 + ,118 + ,364 + ,671 + ,208 + ,119 + ,305 + ,635 + ,204 + ,119 + ,307 + ,648 + ,198 + ,119 + ,312 + ,745 + ,194 + ,119 + ,312 + ,624 + ,192 + ,119 + ,286 + ,477 + ,192 + ,119 + ,324 + ,710 + ,196 + ,120 + ,336 + ,515 + ,192 + ,121 + ,327 + ,461 + ,186 + ,121 + ,302 + ,590 + ,179 + ,122 + ,299 + ,415 + ,174 + ,122 + ,311 + ,554 + ,169 + ,122 + ,315 + ,585 + ,167 + ,123 + ,264 + ,513 + ,165 + ,123 + ,278 + ,591 + ,161 + ,123 + ,278 + ,561 + ,161 + ,123 + ,287 + ,684 + ,164 + ,123 + ,279 + ,668 + ,171 + ,123 + ,324 + ,795 + ,183 + ,125 + ,354 + ,776 + ,191 + ,125 + ,354 + ,1 + ,043 + ,198 + ,125 + ,360 + ,964 + ,205 + ,125 + ,363 + ,762 + ,211 + ,125 + ,385 + ,1 + ,030 + ,220 + ,125 + ,412 + ,939 + ,230 + ,126 + ,370 + ,779 + ,237 + ,126 + ,389 + ,918 + ,242 + ,126 + ,395 + ,839 + ,250 + ,126 + ,417 + ,874 + ,259 + ,126 + ,404 + ,840 + ,270 + ,126) + ,dim=c(4 + ,60) + ,dimnames=list(c('WLH' + ,'Faill' + ,'WLHuit' + ,'Lonen') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('WLH','Faill','WLHuit','Lonen'),1:60)) > 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: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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='kendall') + 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/1q9uu1293458009.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") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Kendall tau rank correlations for all pairs of data series',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'tau',1,TRUE) > a<-table.element(a,'p-value',1,TRUE) > a<-table.row.end(a) > n <- length(y[,1]) > n [1] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 7.8175, p-value = 5.329e-15 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6962208 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste('tau(',dimnames(t(x))[[2]][i]) + dum <- paste(dum,',') + dum <- paste(dum,dimnames(t(x))[[2]][j]) + dum <- paste(dum,')') + a<-table.element(a,dum,header=TRUE) + r <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,r$estimate) + a<-table.element(a,r$p.value) + a<-table.row.end(a) + } + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2tsaz1293458009.tab") > try(system("convert tmp/1q9uu1293458009.ps tmp/1q9uu1293458009.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.476 0.204 1.002