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(21 + ,10.3 + ,544 + ,2472.81 + ,19 + ,7.1 + ,537 + ,2407.6 + ,25 + ,7.7 + ,543 + ,2454.62 + ,21 + ,13.2 + ,594 + ,2448.05 + ,23 + ,15.9 + ,611 + ,2497.84 + ,23 + ,23.2 + ,613 + ,2645.64 + ,19 + ,17.2 + ,611 + ,2756.76 + ,18 + ,16.9 + ,594 + ,2849.27 + ,19 + ,18.2 + ,595 + ,2921.44 + ,19 + ,21.8 + ,591 + ,2981.85 + ,22 + ,19.3 + ,589 + ,3080.58 + ,23 + ,15.8 + ,584 + ,3106.22 + ,20 + ,18.8 + ,573 + ,3119.31 + ,14 + ,24.6 + ,567 + ,3061.26 + ,14 + ,38.2 + ,569 + ,3097.31 + ,14 + ,29.8 + ,621 + ,3161.69 + ,15 + ,26.5 + ,629 + ,3257.16 + ,11 + ,4.7 + ,628 + ,3277.01 + ,17 + ,7.6 + ,612 + ,3295.32 + ,16 + ,11.9 + ,595 + ,3363.99 + ,20 + ,11.6 + ,597 + ,3494.17 + ,24 + ,9.9 + ,593 + ,3667.03 + ,23 + ,8 + ,590 + ,3813.06 + ,20 + ,13.4 + ,580 + ,3917.96 + ,21 + ,13.3 + ,574 + ,3895.51 + ,19 + ,13.3 + ,573 + ,3801.06 + ,23 + ,0.2 + ,573 + ,3570.12 + ,23 + ,5.4 + ,620 + ,3701.61 + ,23 + ,3.9 + ,626 + ,3862.27 + ,23 + ,20.6 + ,620 + ,3970.1 + ,27 + ,18.9 + ,588 + ,4138.52 + ,26 + ,20.7 + ,566 + ,4199.75 + ,17 + ,21.7 + ,557 + ,4290.89 + ,24 + ,23.5 + ,561 + ,4443.91 + ,26 + ,24.6 + ,549 + ,4502.64 + ,24 + ,24.1 + ,532 + ,4356.98 + ,27 + ,21.1 + ,526 + ,4591.27 + ,27 + ,19.2 + ,511 + ,4696.96 + ,26 + ,23 + ,499 + ,4621.4 + ,24 + ,24.4 + ,555 + ,4562.84 + ,23 + ,26.5 + ,565 + ,4202.52 + ,23 + ,21.7 + ,542 + ,4296.49 + ,24 + ,21.8 + ,527 + ,4435.23 + ,17 + ,20.4 + ,510 + ,4105.18 + ,21 + ,22.2 + ,514 + ,4116.68 + ,19 + ,24.7 + ,517 + ,3844.49 + ,22 + ,25 + ,508 + ,3720.98 + ,22 + ,20.3 + ,493 + ,3674.4 + ,18 + ,21.9 + ,490 + ,3857.62 + ,16 + ,23.1 + ,469 + ,3801.06 + ,14 + ,25.5 + ,478 + ,3504.37 + ,12 + ,20.3 + ,528 + ,3032.6 + ,14 + ,15.2 + ,534 + ,3047.03 + ,16 + ,15.4 + ,518 + ,2962.34 + ,8 + ,14.3 + ,506 + ,2197.82 + ,3 + ,16.6 + ,502 + ,2014.45 + ,0 + ,14.2 + ,516 + ,1862.83 + ,5 + ,6.7 + ,528 + ,1905.41 + ,1 + ,3.4 + ,533 + ,1810.99 + ,1 + ,2 + ,536 + ,1670.07 + ,3 + ,NA + ,537 + ,1864.44) + ,dim=c(4 + ,61) + ,dimnames=list(c('Consv' + ,'Inves' + ,'Werkl' + ,'Aand') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('Consv','Inves','Werkl','Aand'),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/freestat/rcomp/tmp/1icel1257585313.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 1.0508, p-value = 0.2934 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.09572335 > 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/freestat/rcomp/tmp/2q9w41257585313.tab") > > system("convert tmp/1icel1257585313.ps tmp/1icel1257585313.png") > > > proc.time() user system elapsed 0.726 0.308 0.837