R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(2490 + ,535 + ,1529 + ,458 + ,3266 + ,681 + ,2186 + ,582 + ,3475 + ,830 + ,3069 + ,597 + ,3127 + ,720 + ,3252 + ,729 + ,2955 + ,582 + ,3541 + ,812 + ,3870 + ,806 + ,3435 + ,697 + ,2852 + ,728 + ,2320 + ,545 + ,3142 + ,803 + ,3285 + ,677 + ,3029 + ,830 + ,2681 + ,598 + ,3180 + ,699 + ,3019 + ,701 + ,2560 + ,622 + ,3833 + ,956 + ,2733 + ,655 + ,3472 + ,971 + ,2452 + ,571 + ,2971 + ,967 + ,2553 + ,512 + ,2770 + ,683 + ,2777 + ,674 + ,3060 + ,611 + ,2520 + ,522 + ,4124 + ,955 + ,2318 + ,627 + ,3282 + ,782 + ,2873 + ,769 + ,3772 + ,877 + ,2311 + ,633 + ,1500 + ,399 + ,2395 + ,715 + ,2844 + ,615 + ,2099 + ,702 + ,3449 + ,906 + ,2268 + ,678 + ,4356 + ,1324 + ,2316 + ,531 + ,3150 + ,952 + ,2181 + ,562 + ,2425 + ,710 + ,2175 + ,504 + ,1212 + ,288 + ,2627 + ,552 + ,1328 + ,312 + ,2578 + ,511 + ,2097 + ,313 + ,3090 + ,695 + ,2167 + ,387 + ,2634 + ,559 + ,2773 + ,540 + ,3225 + ,677 + ,2368 + ,465 + ,2938 + ,636 + ,1387 + ,282 + ,3174 + ,694 + ,2478 + ,389 + ,3350 + ,694 + ,2702 + ,488 + ,2588 + ,624 + ,3349 + ,803 + ,2061 + ,524 + ,3114 + ,1050 + ,2691 + ,557 + ,3394 + ,1027 + ,2061 + ,490 + ,1249 + ,332 + ,2918 + ,475 + ,2155 + ,466 + ,2223 + ,492 + ,2188 + ,353 + ,2651 + ,491 + ,2363 + ,345 + ,2379 + ,489 + ,2040 + ,341 + ,3146 + ,606 + ,2144 + ,354 + ,2883 + ,618 + ,1440 + ,287 + ,2768 + ,607 + ,2485 + ,379 + ,3258 + ,637 + ,2904 + ,533 + ,2839 + ,597 + ,2452 + ,534 + ,2470 + ,539 + ,2855 + ,578 + ,5072 + ,600 + ,3966 + ,991 + ,1463 + ,448 + ,1621 + ,366 + ,1600 + ,520 + ,1717 + ,254 + ,2203 + ,607 + ,2370 + ,449 + ,2013 + ,566 + ,1849 + ,349 + ,2169 + ,595 + ,2262 + ,532 + ,2640 + ,625 + ,2494 + ,590 + ,2411 + ,667 + ,2010 + ,469 + ,2528 + ,587 + ,1901 + ,362 + ,2292 + ,629 + ,2027 + ,424 + ,1988 + ,562 + ,1769 + ,372 + ,1774 + ,511 + ,1271 + ,253 + ,2279 + ,664 + ,1571 + ,462) + ,dim=c(4 + ,60) + ,dimnames=list(c('BvWg' + ,'GBWg' + ,'BvNWg' + ,'GBNWg') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('BvWg','GBWg','BvNWg','GBNWg'),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > main = 'Kendall tau Correlation Plot' > #'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/1vnhw1229271592.ps",horizontal=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 = 4.3248, p-value = 1.527e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3837014 > 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/28c5i1229271592.tab") > > system("convert tmp/1vnhw1229271592.ps tmp/1vnhw1229271592.png") > > > proc.time() user system elapsed 0.498 0.214 0.566