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(100 + ,100 + ,100 + ,100 + ,87.14054095 + ,99.31916948 + ,84.48959366 + ,85.95702149 + ,112.0054296 + ,114.7106298 + ,96.92765114 + ,68.015992 + ,112.312101 + ,114.9941367 + ,98.26560951 + ,91.25437281 + ,109.474134 + ,114.6085397 + ,107.5569871 + ,104.2978511 + ,104.9746116 + ,116.3633855 + ,103.64222 + ,71.11444278 + ,100.4926851 + ,108.0492516 + ,93.45887017 + ,94.35282359 + ,104.2154743 + ,112.8502449 + ,105.2527255 + ,71.91404298 + ,120.1768388 + ,127.2518452 + ,126.1397423 + ,74.8125937 + ,112.1028355 + ,116.4999655 + ,112.4132805 + ,98.4007996 + ,108.1481575 + ,113.8511416 + ,107.9286422 + ,115.6921539 + ,116.802197 + ,126.3771815 + ,100.7928642 + ,109.5452274 + ,102.1699512 + ,103.8290681 + ,106.1199207 + ,110.2948526 + ,95.15358705 + ,108.296889 + ,103.666997 + ,122.0389805 + ,120.6707808 + ,125.0969166 + ,142.888999 + ,91.2043978 + ,111.5234277 + ,115.6701386 + ,120.6144698 + ,114.8425787 + ,119.9669448 + ,130.2545354 + ,104.8067393 + ,118.9905047 + ,113.3697401 + ,131.2064565 + ,121.7294351 + ,103.1984008 + ,110.0717661 + ,124.8665241 + ,121.1100099 + ,124.5877061 + ,111.5567342 + ,122.6191626 + ,129.4846383 + ,90.85457271 + ,132.424212 + ,148.2368766 + ,103.691774 + ,108.9455272 + ,107.900558 + ,117.7160792 + ,116.7740337 + ,123.1384308 + ,122.1626615 + ,128.9232255 + ,105.2031715 + ,107.0964518 + ,124.3992258 + ,130.7380837 + ,122.8444004 + ,121.0894553 + ,110.4450505 + ,113.1192661 + ,121.283449 + ,110.2948526 + ,101.5874013 + ,116.5454922 + ,114.147671 + ,102.1989005 + ,122.3203962 + ,127.9782024 + ,127.4281467 + ,90.30484758 + ,125.2582826 + ,132.9240533 + ,124.6778989 + ,116.4417791 + ,125.4411543 + ,133.9732358 + ,139.147671 + ,118.1909045 + ,108.9902468 + ,121.2623301 + ,154.5094153 + ,119.6401799 + ,118.9243879 + ,128.559702 + ,124.6531219 + ,104.2978511 + ,116.7242723 + ,124.692695 + ,167.1456888 + ,104.4477761 + ,134.1724901 + ,140.9850314 + ,121.6551041 + ,123.5382309 + ,116.8530994 + ,124.6823481 + ,130.4013875 + ,142.0789605 + ,124.5732995 + ,134.9451611 + ,124.2814668 + ,122.8385807 + ,130.9914031 + ,137.2642616 + ,131.0951437 + ,124.4877561 + ,123.4239103 + ,132.6308891 + ,134.2666006 + ,125.6371814 + ,111.4536725 + ,122.7122853 + ,166.3032706 + ,125.5372314 + ,124.5135991 + ,132.5846727 + ,166.8483647 + ,103.5482259 + ,139.2589613 + ,151.5410085 + ,151.2140733 + ,114.0929535 + ,129.8596099 + ,145.764641 + ,154.8562934 + ,127.0864568 + ,112.3460359 + ,134.4043595 + ,139.444995 + ,108.8955522 + ,131.381655 + ,152.9192247 + ,140.8572844 + ,122.1389305 + ,133.0004776 + ,143.9387459 + ,171.308226 + ,116.5417291 + ,134.3220552 + ,152.9709595 + ,133.3994054 + ,106.2468766 + ,144.2379719 + ,162.3356557 + ,131.8384539 + ,119.6901549 + ,134.1278719 + ,148.1658274 + ,147.4231913 + ,167.6661669 + ,150.1891559 + ,167.9499207 + ,158.8453915 + ,124.3378311 + ,140.722563 + ,156.9400566 + ,159.0436075 + ,132.2338831 + ,114.8389975 + ,140.2241843 + ,163.2309217 + ,137.6311844 + ,143.1973003 + ,163.13996 + ,187.9335976 + ,90.30484758 + ,140.2738676 + ,160.969166 + ,195.4410307 + ,127.986007 + ,112.1248303 + ,135.3031662 + ,234.4152626 + ,123.6381809 + ,102.8951536 + ,124.4554046 + ,161.1992071 + ,113.8430785 + ,100.5090242 + ,119.2143202 + ,162.7106046 + ,123.988006 + ,103.3513901 + ,116.21163 + ,192.2943508 + ,76.8115942 + ,111.4134533 + ,125.2638477 + ,151.6352825 + ,112.6936532 + ,104.5887587 + ,114.0987791 + ,134.8116947 + ,137.1314343 + ,101.7840983 + ,110.0413879 + ,112.9088206 + ,200.049975 + ,114.7007441 + ,126.6317169 + ,105.0297324 + ,150.8245877 + ,108.7426474 + ,113.0875354 + ,122.0267592 + ,172.5137431) + ,dim=c(4 + ,61) + ,dimnames=list(c('Totuit' + ,'Totin' + ,'Invchin' + ,'Uitvchin') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('Totuit','Totin','Invchin','Uitvchin'),1:61)) > 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/1v8et1257946490.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 = 8.7245, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7661202 > 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/29grj1257946490.tab") > system("convert tmp/1v8et1257946490.ps tmp/1v8et1257946490.png") > > > proc.time() user system elapsed 0.507 0.225 0.601