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(10144 + ,112 + ,285 + ,1915 + ,10751 + ,304 + ,574 + ,1843 + ,11752 + ,794 + ,865 + ,1761 + ,13808 + ,901 + ,1147 + ,2858 + ,16203 + ,1232 + ,1516 + ,3968 + ,17432 + ,1240 + ,1789 + ,5061 + ,18014 + ,1032 + ,2087 + ,4661 + ,16956 + ,1145 + ,2372 + ,4269 + ,17982 + ,1588 + ,2669 + ,3857 + ,19435 + ,2264 + ,2966 + ,3568 + ,19990 + ,2209 + ,3270 + ,3274 + ,20154 + ,2917 + ,3652 + ,2987 + ,10327 + ,243 + ,329 + ,1683 + ,9807 + ,558 + ,658 + ,1381 + ,10862 + ,1238 + ,988 + ,1071 + ,13743 + ,1502 + ,1303 + ,2772 + ,16458 + ,2000 + ,1603 + ,4485 + ,18466 + ,2146 + ,1929 + ,6181 + ,18810 + ,2066 + ,2235 + ,5479 + ,17361 + ,2046 + ,2544 + ,4782 + ,17411 + ,1952 + ,2872 + ,4067 + ,18517 + ,2771 + ,3198 + ,3489 + ,18525 + ,3278 + ,3544 + ,2903 + ,17859 + ,4000 + ,3903 + ,2330 + ,9499 + ,410 + ,332 + ,1736 + ,9490 + ,1107 + ,665 + ,1483 + ,9255 + ,1622 + ,1001 + ,1242 + ,10758 + ,1986 + ,1329 + ,2334 + ,12375 + ,2036 + ,1639 + ,3423 + ,14617 + ,2400 + ,1975 + ,4523 + ,15427 + ,2736 + ,2304 + ,3986 + ,14136 + ,2901 + ,2640 + ,3462 + ,14308 + ,2883 + ,2992 + ,2908 + ,15293 + ,3747 + ,3330 + ,2575 + ,15679 + ,4075 + ,3690 + ,2237 + ,16319 + ,4996 + ,4063 + ,1904 + ,11196 + ,575 + ,368 + ,1610 + ,11169 + ,999 + ,738 + ,1251 + ,12158 + ,1411 + ,1103 + ,941 + ,14251 + ,1493 + ,1474 + ,2450 + ,16237 + ,1846 + ,1846 + ,3946 + ,19706 + ,2899 + ,2224 + ,5409 + ,18960 + ,2372 + ,2608 + ,4741 + ,18537 + ,2856 + ,2984 + ,4069 + ,19103 + ,3468 + ,3351 + ,3539 + ,19691 + ,4193 + ,3736 + ,3189 + ,19464 + ,4440 + ,4122 + ,2960 + ,17264 + ,4186 + ,4558 + ,2704 + ,8957 + ,655 + ,378 + ,1697 + ,9703 + ,1453 + ,749 + ,1598 + ,9166 + ,1989 + ,1113 + ,1456 + ,9519 + ,2209 + ,1500 + ,2316 + ,10535 + ,2667 + ,1867 + ,3083 + ,11526 + ,3005 + ,2244 + ,4158 + ,9630 + ,2195 + ,2621 + ,3469 + ,7061 + ,2236 + ,2988 + ,2892 + ,6021 + ,2489 + ,3349 + ,2578 + ,4728 + ,2651 + ,3723 + ,2233 + ,2657 + ,2636 + ,4108 + ,1947 + ,1264 + ,2819 + ,4514 + ,2049) + ,dim=c(4 + ,60) + ,dimnames=list(c('lov' + ,'di' + ,'aink' + ,'belin') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('lov','di','aink','belin'),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/146pf1258126347.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 = 3.0551, p-value = 0.00225 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2706979 > 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/25vez1258126347.tab") > > system("convert tmp/146pf1258126347.ps tmp/146pf1258126347.png") > > > proc.time() user system elapsed 0.500 0.211 0.860