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(130 + ,87.1 + ,122.6 + ,100.0 + ,136.7 + ,110.5 + ,115.4 + ,120.3 + ,138.1 + ,110.8 + ,109 + ,130.5 + ,139.5 + ,104.2 + ,129.1 + ,118.4 + ,140.4 + ,88.9 + ,102.8 + ,114.7 + ,144.6 + ,89.8 + ,96.2 + ,110.2 + ,151.4 + ,90 + ,127.7 + ,111.4 + ,147.9 + ,93.9 + ,128.9 + ,100.9 + ,141.5 + ,91.3 + ,126.5 + ,88.7 + ,143.8 + ,87.8 + ,119.8 + ,118.2 + ,143.6 + ,99.7 + ,113.2 + ,129.5 + ,150.5 + ,73.5 + ,114.1 + ,119.2 + ,150.1 + ,79.2 + ,134.1 + ,109.8 + ,154.9 + ,96.9 + ,130 + ,117.4 + ,162.1 + ,95.2 + ,121.8 + ,143.4 + ,176.7 + ,95.6 + ,132.1 + ,162.2 + ,186.6 + ,89.7 + ,105.3 + ,148.8 + ,194.8 + ,92.8 + ,103 + ,130.5 + ,196.3 + ,88 + ,117.1 + ,166.0 + ,228.8 + ,101.1 + ,126.3 + ,143.3 + ,267.2 + ,92.7 + ,138.1 + ,139.6 + ,237.2 + ,95.8 + ,119.5 + ,171.4 + ,254.7 + ,103.8 + ,138 + ,164.7 + ,258.2 + ,81.8 + ,135.5 + ,166.3 + ,257.9 + ,87.1 + ,178.6 + ,156.2 + ,269.6 + ,105.9 + ,162.2 + ,170.4 + ,266.9 + ,108.1 + ,176.9 + ,161.5 + ,269.6 + ,102.6 + ,204.9 + ,184.3 + ,253.9 + ,93.7 + ,132.2 + ,164.3 + ,258.6 + ,103.5 + ,142.5 + ,175.2 + ,274.2 + ,100.6 + ,164.3 + ,173.1 + ,301.5 + ,113.3 + ,174.9 + ,132.7 + ,304.5 + ,102.4 + ,175.4 + ,136.2 + ,285.1 + ,102.1 + ,143 + ,163.3 + ,287.7 + ,106.9 + ,158.7 + ,160.3 + ,265.5 + ,87.3 + ,155.4 + ,175.5 + ,264.1 + ,93.1 + ,176.6 + ,159.1 + ,276.1 + ,109.1 + ,163.3 + ,164.9 + ,258.9 + ,120.3 + ,178.9 + ,171.7 + ,239.1 + ,104.9 + ,182.7 + ,222.1 + ,250.1 + ,92.6 + ,158.9 + ,195.7 + ,276.8 + ,109.8 + ,115.5 + ,235.2 + ,297.6 + ,111.4 + ,169.4 + ,233.4 + ,295.4 + ,117.9 + ,168 + ,189.1 + ,283 + ,121.6 + ,159.8 + ,230.1 + ,275.8 + ,117.8 + ,129 + ,254.1 + ,279.7 + ,124.2 + ,157.9 + ,260.2 + ,254.6 + ,106.8 + ,169.5 + ,270.3 + ,234.6 + ,102.7 + ,169.1 + ,229.6 + ,176.9 + ,116.8 + ,183.6 + ,277.6 + ,148.1 + ,113.6 + ,168.9 + ,259.0 + ,122.7 + ,96.1 + ,186.2 + ,301.3 + ,124.9 + ,85 + ,227.1 + ,271.5 + ,121.6 + ,83.2 + ,126.4 + ,287.1 + ,128.4 + ,84.9 + ,169.3 + ,295.6 + ,144.5 + ,83 + ,175 + ,273.8 + ,151.8 + ,79.6 + ,133.9 + ,257.9 + ,167.1 + ,83.2 + ,110.1 + ,245.6 + ,173.8 + ,83.8 + ,104.3 + ,278.5 + ,203.7 + ,82.8 + ,108.7 + ,241.5 + ,199.8 + ,71.4 + ,112.6 + ,215.5) + ,dim=c(4 + ,61) + ,dimnames=list(c('prijs' + ,'prod' + ,'omzet' + ,'invoer') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('prijs','prod','omzet','invoer'),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/1b0av1258144260.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 = 4.0514, p-value = 5.092e-05 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.3560295 > 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/2uyhu1258144260.tab") > > system("convert tmp/1b0av1258144260.ps tmp/1b0av1258144260.png") > > > proc.time() user system elapsed 0.511 0.196 0.581