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(97.4 + ,519 + ,1867 + ,291 + ,97 + ,517 + ,1864 + ,289 + ,105.4 + ,510 + ,1853 + ,292 + ,102.7 + ,509 + ,1866 + ,283 + ,98.1 + ,501 + ,1852 + ,283 + ,104.5 + ,507 + ,1823 + ,274 + ,87.4 + ,569 + ,1862 + ,281 + ,89.9 + ,580 + ,1859 + ,271 + ,109.8 + ,578 + ,1855 + ,277 + ,111.7 + ,565 + ,1871 + ,271 + ,98.6 + ,547 + ,1822 + ,272 + ,96.9 + ,555 + ,1865 + ,282 + ,95.1 + ,562 + ,1922 + ,281 + ,97 + ,561 + ,1960 + ,284 + ,112.7 + ,555 + ,1978 + ,282 + ,102.9 + ,544 + ,1975 + ,279 + ,97.4 + ,537 + ,1953 + ,278 + ,111.4 + ,543 + ,1931 + ,280 + ,87.4 + ,594 + ,1922 + ,287 + ,96.8 + ,611 + ,1904 + ,287 + ,114.1 + ,613 + ,1927 + ,283 + ,110.3 + ,611 + ,1943 + ,314 + ,103.9 + ,594 + ,1937 + ,315 + ,101.6 + ,595 + ,1960 + ,306 + ,94.6 + ,591 + ,1955 + ,309 + ,95.9 + ,589 + ,1958 + ,307 + ,104.7 + ,584 + ,1953 + ,302 + ,102.8 + ,573 + ,1983 + ,297 + ,98.1 + ,567 + ,1985 + ,303 + ,113.9 + ,569 + ,1980 + ,304 + ,80.9 + ,621 + ,1975 + ,307 + ,95.7 + ,629 + ,1961 + ,310 + ,113.2 + ,628 + ,1996 + ,300 + ,105.9 + ,612 + ,2008 + ,295 + ,108.8 + ,595 + ,2016 + ,300 + ,102.3 + ,597 + ,2025 + ,300 + ,99 + ,593 + ,2118 + ,297 + ,100.7 + ,590 + ,2111 + ,291 + ,115.5 + ,580 + ,2137 + ,288 + ,100.7 + ,574 + ,2110 + ,290 + ,109.9 + ,573 + ,2131 + ,293 + ,114.6 + ,573 + ,2111 + ,282 + ,85.4 + ,620 + ,2132 + ,287 + ,100.5 + ,626 + ,2140 + ,275 + ,114.8 + ,620 + ,2143 + ,282 + ,116.5 + ,588 + ,2139 + ,282 + ,112.9 + ,566 + ,2101 + ,277 + ,102 + ,557 + ,2089 + ,275 + ,106 + ,561 + ,2127 + ,284 + ,105.3 + ,549 + ,2084 + ,280 + ,118.8 + ,532 + ,1980 + ,270 + ,106.1 + ,526 + ,2001 + ,265 + ,109.3 + ,511 + ,1944 + ,255 + ,117.2 + ,499 + ,1783 + ,246 + ,92.5 + ,555 + ,1832 + ,254 + ,104.2 + ,565 + ,1827 + ,258 + ,112.5 + ,542 + ,1806 + ,263 + ,122.4 + ,527 + ,1818 + ,243 + ,113.3 + ,510 + ,1798 + ,230 + ,100 + ,514 + ,1824 + ,236 + ,110.7 + ,517 + ,1834 + ,249 + ,112.8 + ,508 + ,1851 + ,236 + ,109.8 + ,493 + ,1813 + ,231 + ,117.3 + ,490 + ,1788 + ,229 + ,109.1 + ,469 + ,1737 + ,227 + ,115.9 + ,478 + ,1699 + ,227 + ,96 + ,528 + ,1724 + ,233 + ,99.8 + ,534 + ,1686 + ,232 + ,116.8 + ,518 + ,1686 + ,227 + ,115.7 + ,506 + ,1682 + ,217 + ,99.4 + ,502 + ,1698 + ,217 + ,94.3 + ,516 + ,1742 + ,220) + ,dim=c(4 + ,72) + ,dimnames=list(c('Ind' + ,'Werk' + ,'Man' + ,'Vrouw') + ,1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('Ind','Werk','Man','Vrouw'),1:72)) > 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/1amjo1258119198.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 = -2.0423, p-value = 0.04112 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1650298 > 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/2027a1258119198.tab") > > system("convert tmp/1amjo1258119198.ps tmp/1amjo1258119198.png") > > > proc.time() user system elapsed 0.513 0.211 0.573