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(114.1 + ,128.4 + ,8.9 + ,49 + ,110.3 + ,131.4 + ,8.6 + ,51 + ,103.9 + ,135.1 + ,8.3 + ,54 + ,101.6 + ,134 + ,8.3 + ,52 + ,94.6 + ,144.5 + ,8.3 + ,52 + ,95.9 + ,147.3 + ,8.4 + ,53 + ,104.7 + ,150.9 + ,8.5 + ,51 + ,102.8 + ,148.7 + ,8.4 + ,55 + ,98.1 + ,141.4 + ,8.6 + ,53 + ,113.9 + ,138.9 + ,8.5 + ,51 + ,80.9 + ,139.8 + ,8.5 + ,52 + ,95.7 + ,145.6 + ,8.4 + ,54 + ,113.2 + ,147.9 + ,8.5 + ,58 + ,105.9 + ,148.5 + ,8.5 + ,57 + ,108.8 + ,151.1 + ,8.5 + ,52 + ,102.3 + ,157.5 + ,8.5 + ,50 + ,99 + ,167.5 + ,8.5 + ,53 + ,100.7 + ,172.3 + ,8.5 + ,50 + ,115.5 + ,173.5 + ,8.5 + ,50 + ,100.7 + ,187.5 + ,8.5 + ,51 + ,109.9 + ,205.5 + ,8.6 + ,53 + ,114.6 + ,195.1 + ,8.4 + ,49 + ,85.4 + ,204.5 + ,8.1 + ,54 + ,100.5 + ,204.5 + ,8 + ,57 + ,114.8 + ,201.7 + ,8 + ,58 + ,116.5 + ,207 + ,8 + ,56 + ,112.9 + ,206.6 + ,8 + ,60 + ,102 + ,210.6 + ,7.9 + ,55 + ,106 + ,211.1 + ,7.8 + ,54 + ,105.3 + ,215 + ,7.8 + ,52 + ,118.8 + ,223.9 + ,7.9 + ,55 + ,106.1 + ,238.2 + ,8.1 + ,56 + ,109.3 + ,238.9 + ,8 + ,54 + ,117.2 + ,229.6 + ,7.6 + ,53 + ,92.5 + ,232.2 + ,7.3 + ,59 + ,104.2 + ,222.1 + ,7 + ,62 + ,112.5 + ,221.6 + ,6.8 + ,63 + ,122.4 + ,227.3 + ,7 + ,64 + ,113.3 + ,221 + ,7.1 + ,75 + ,100 + ,213.6 + ,7.2 + ,77 + ,110.7 + ,243.4 + ,7.1 + ,79 + ,112.8 + ,253.8 + ,6.9 + ,77 + ,109.8 + ,265.3 + ,6.7 + ,82 + ,117.3 + ,268.2 + ,6.7 + ,83 + ,109.1 + ,268.5 + ,6.6 + ,81 + ,115.9 + ,266.9 + ,6.9 + ,78 + ,96 + ,268.4 + ,7.3 + ,79 + ,99.8 + ,250.8 + ,7.4 + ,79 + ,116.8 + ,231.2 + ,7.3 + ,73 + ,115.7 + ,192 + ,7 + ,72 + ,99.4 + ,171.4 + ,6.9 + ,67 + ,94.3 + ,160 + ,7.1 + ,67 + ,91 + ,148.1 + ,7.5 + ,50 + ,93.2 + ,144.8 + ,7.7 + ,45 + ,103.1 + ,147.2 + ,7.9 + ,39 + ,94.1 + ,155.1 + ,7.8 + ,39 + ,91.8 + ,161.1 + ,7.7 + ,37 + ,102.7 + ,169.9 + ,7.8 + ,30 + ,82.6 + ,176.2 + ,7.8 + ,24 + ,89.1 + ,193.1 + ,7.9 + ,27 + ,104.5 + ,194.9 + ,8 + ,19) + ,dim=c(4 + ,61) + ,dimnames=list(c('indprodind' + ,'prijsgroind' + ,'werklgraad' + ,'consuprijs') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('indprodind','prijsgroind','werklgraad','consuprijs'),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/10pqk1261342639.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.788, p-value = 0.005304 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2449426 > 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/2m44p1261342639.tab") > > try(system("convert tmp/10pqk1261342639.ps tmp/10pqk1261342639.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.493 0.201 0.865