R version 2.6.0 (2007-10-03) Copyright (C) 2007 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. Natural language support but running in an English locale 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(153.4 + ,174.1 + ,145.3 + ,145.9 + ,159.5 + ,180.4 + ,143.6 + ,158.5 + ,157.4 + ,182.6 + ,142.8 + ,152.2 + ,169.1 + ,207.1 + ,155.9 + ,153.7 + ,172.6 + ,213.7 + ,156.2 + ,157.9 + ,161.7 + ,186.5 + ,149.8 + ,154.4 + ,159.2 + ,179.1 + ,152.7 + ,150.7 + ,157.4 + ,168.3 + ,155.5 + ,151.2 + ,153.9 + ,156.5 + ,159.3 + ,147.3 + ,144.8 + ,144.3 + ,143 + ,146.6 + ,142.2 + ,138.9 + ,141.4 + ,145.2 + ,140.1 + ,137.8 + ,142.8 + ,139.3 + ,143.4 + ,136.3 + ,146.4 + ,145.7 + ,153.3 + ,140.3 + ,152.3 + ,163.3 + ,166.9 + ,149.1 + ,164.3 + ,181.8 + ,170.6 + ,149.2 + ,168 + ,188.1 + ,182.8 + ,140.4 + ,171.3 + ,222.9 + ,170.3 + ,129 + ,162.7 + ,206.3 + ,156.6 + ,124.7 + ,150.2 + ,184.9 + ,155.2 + ,130.8 + ,142.5 + ,183.6 + ,154.7 + ,130.1 + ,138.2 + ,186.6 + ,151.6 + ,133.2 + ,138 + ,176.5 + ,152.1 + ,130.1 + ,145.1 + ,173.9 + ,153.2 + ,126.6 + ,138.4 + ,184.9 + ,149.5 + ,124.8 + ,131.8 + ,182.5 + ,149.7 + ,125.3 + ,130.8 + ,183.6 + ,144.3 + ,126.9 + ,126.3 + ,172.4 + ,140 + ,120.1 + ,123 + ,168.9 + ,137.8 + ,118.7 + ,124 + ,163.3 + ,132.2 + ,117.7 + ,120.8 + ,152.4 + ,128.9 + ,113.4 + ,122.1 + ,145.8 + ,123.1 + ,107.5 + ,106.5 + ,148.6 + ,120.4 + ,107.6 + ,104.3 + ,143.4 + ,122.8 + ,114.3 + ,108.7 + ,141.2 + ,126 + ,114.9 + ,113.8 + ,144.6 + ,124.5 + ,111.2 + ,112.5 + ,144.5 + ,120.6 + ,109.9 + ,106.1 + ,140.8 + ,114.7 + ,108.6 + ,98.4 + ,133.3 + ,111.7 + ,109.2 + ,96 + ,127.3 + ,109.1 + ,106.4 + ,99.3 + ,119.6 + ,108 + ,103.7 + ,97.5 + ,120.2 + ,107.7 + ,103 + ,95.3 + ,121.9 + ,99.9 + ,96.9 + ,88 + ,112.4 + ,103.7 + ,104.7 + ,94.7 + ,111 + ,103.4 + ,102.2 + ,99.4 + ,107.8 + ,103.4 + ,99 + ,98.9 + ,110.5 + ,104.7 + ,95.8 + ,96.4 + ,118.3 + ,105.8 + ,94.5 + ,95.3 + ,123 + ,105.3 + ,102.7 + ,99.5 + ,112.1 + ,103 + ,103.2 + ,101.6 + ,104.2 + ,103.8 + ,105.6 + ,103.9 + ,102.4 + ,103.4 + ,103.9 + ,106.6 + ,100.3 + ,105.8 + ,107.2 + ,108.3 + ,102.6 + ,101.4 + ,100.7 + ,102 + ,101.5 + ,97 + ,92.1 + ,93.8 + ,103.4 + ,94.3 + ,90.3 + ,91.6 + ,99.4 + ,96.6 + ,93.4 + ,97.7 + ,97.9 + ,97.1 + ,98.5 + ,94.8 + ,98 + ,95.7 + ,100.8 + ,98 + ,90.2 + ,96.9 + ,102.3 + ,103.8 + ,87.1 + ,97.4 + ,104.7 + ,97.8 + ,91.8 + ,95.3 + ,101.1 + ,91.2 + ,94.8 + ,93.6 + ,101.4 + ,89.3 + ,91.8 + ,91.5 + ,99.5 + ,87.5 + ,89.3 + ,93.1 + ,98.4 + ,90.4 + ,91.7 + ,91.7 + ,96.3 + ,94.2 + ,86.2 + ,94.3 + ,100.7 + ,102.2 + ,82.8 + ,93.9 + ,101.2 + ,101.3 + ,82.3 + ,90.9 + ,100.3 + ,96 + ,79.8 + ,88.3 + ,97.8 + ,90.8 + ,79.4 + ,91.3 + ,97.4 + ,93.2 + ,85.3 + ,91.7 + ,98.6 + ,90.9 + ,87.5 + ,92.4 + ,99.7 + ,91.1 + ,88.3 + ,92 + ,99 + ,90.2 + ,88.6 + ,95.6 + ,98.1 + ,94.3 + ,94.9 + ,95.8 + ,97 + ,96 + ,94.7 + ,96.4 + ,98.5 + ,99 + ,92.6 + ,99 + ,103.8 + ,103.3 + ,91.8 + ,107 + ,114.4 + ,113.1 + ,96.4 + ,109.7 + ,124.5 + ,112.8 + ,96.4 + ,116.2 + ,134.2 + ,112.1 + ,107.1 + ,115.9 + ,131.8 + ,107.4 + ,111.9 + ,113.8 + ,125.6 + ,111 + ,107.8 + ,112.6 + ,119.9 + ,110.5 + ,109.2 + ,113.7 + ,114.9 + ,110.8 + ,115.3 + ,115.9 + ,115.5 + ,112.4 + ,119.2 + ,110.3 + ,112.5 + ,111.5 + ,107.8 + ,111.3 + ,111.4 + ,116.2 + ,106.8 + ,113.4 + ,115.3 + ,122.5 + ,104.2 + ,108.2 + ,110.8 + ,121.3 + ,94.8 + ,104.8 + ,103.7 + ,113.9 + ,97.5 + ,106 + ,111.1 + ,110.7 + ,98.3 + ,110.9 + ,113 + ,120.8 + ,100.6 + ,115 + ,111.2 + ,141.1 + ,94.9 + ,118.4 + ,117.6 + ,147.4 + ,93.6 + ,121.4 + ,121.7 + ,148 + ,98 + ,128.8 + ,127.3 + ,158.1 + ,104.3 + ,131.7 + ,129.8 + ,165 + ,103.9 + ,141.7 + ,137.1 + ,187 + ,105.3 + ,142.9 + ,141.4 + ,190.3 + ,102.6 + ,139.4 + ,137.4 + ,182.4 + ,103.3 + ,134.7 + ,130.7 + ,168.8 + ,107.9 + ,125 + ,117.2 + ,151.2 + ,107.8 + ,113.6 + ,110.8 + ,120.1 + ,109.8 + ,111.5 + ,111.4 + ,112.5 + ,110.6 + ,108.5 + ,108.2 + ,106.2 + ,110.8 + ,112.3 + ,108.8 + ,107.1 + ,119.3 + ,116.6 + ,110.2 + ,108.5 + ,128.1 + ,115.5 + ,109.5 + ,106.5 + ,127.6 + ,120.1 + ,109.5 + ,108.3 + ,137.9 + ,132.9 + ,116 + ,125.6 + ,151.4 + ,128.1 + ,111.2 + ,124 + ,143.6 + ,129.3 + ,112.1 + ,127.2 + ,143.4 + ,132.5 + ,114 + ,136.9 + ,141.9 + ,131 + ,119.1 + ,135.8 + ,135.2 + ,124.9 + ,114.1 + ,124.3 + ,133.1 + ,120.8 + ,115.1 + ,115.4 + ,129.6 + ,122 + ,115.4 + ,113.6 + ,134.1 + ,122.1 + ,110.8 + ,114.4 + ,136.8 + ,127.4 + ,116 + ,118.4 + ,143.5 + ,135.2 + ,119.2 + ,117 + ,162.5 + ,137.3 + ,126.5 + ,116.5 + ,163.1 + ,135 + ,127.8 + ,115.4 + ,157.2 + ,136 + ,131.3 + ,113.6 + ,158.8 + ,138.4 + ,140.3 + ,117.4 + ,155.4 + ,134.7 + ,137.3 + ,116.9 + ,148.5 + ,138.4 + ,143 + ,116.4 + ,154.2 + ,133.9 + ,134.5 + ,111.1 + ,153.3 + ,133.6 + ,139.9 + ,110.2 + ,149.4 + ,141.2 + ,159.3 + ,118.9 + ,147.9 + ,151.8 + ,170.4 + ,131.8 + ,156 + ,155.4 + ,175 + ,130.6 + ,163 + ,156.6 + ,175.8 + ,138.3 + ,159.1 + ,161.6 + ,180.9 + ,148.4 + ,159.5 + ,160.7 + ,180.3 + ,148.7 + ,157.3 + ,156 + ,169.6 + ,144.3 + ,156.4 + ,159.5 + ,172.3 + ,152.5 + ,156.6 + ,168.7 + ,184.8 + ,162.9 + ,162.4 + ,169.9 + ,177.7 + ,167.2 + ,166.8 + ,169.9 + ,184.6 + ,166.5 + ,162.6 + ,185.9 + ,211.4 + ,185.6 + ,168.1) + ,dim=c(4 + ,141) + ,dimnames=list(c('Totaal' + ,'Graan' + ,'Olie' + ,'Suiker') + ,1:141)) > y <- array(NA,dim=c(4,141),dimnames=list(c('Totaal','Graan','Olie','Suiker'),1:141)) > 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: Wessa P., (2007), Multivariate Correlation Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_pairs.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description > 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/11mhi1196418241.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 > 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 = 13.4654, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7665145 > 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/2ag531196418241.tab") > > system("convert tmp/11mhi1196418241.ps tmp/11mhi1196418241.png") > > > proc.time() user system elapsed 1.684 0.419 1.746