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(2648.9 + ,99.5 + ,101 + ,106.7 + ,2669.6 + ,93.5 + ,98.7 + ,110.2 + ,3042.3 + ,104.6 + ,105.1 + ,125.9 + ,2604.2 + ,95.3 + ,98.4 + ,100.1 + ,2732.1 + ,102.8 + ,101.7 + ,106.4 + ,2621.7 + ,103.3 + ,102.9 + ,114.8 + ,2483.7 + ,100.2 + ,92.2 + ,81.3 + ,2479.3 + ,107.9 + ,94.9 + ,87 + ,2684.6 + ,107.5 + ,92.8 + ,104.2 + ,2834.7 + ,119.8 + ,98.5 + ,108 + ,2566.1 + ,112 + ,94.3 + ,105 + ,2251.2 + ,102.1 + ,87.4 + ,94.5 + ,2350 + ,105.3 + ,103.4 + ,92 + ,2299.8 + ,101.3 + ,101.2 + ,95.9 + ,2542.8 + ,108.4 + ,109.6 + ,108.8 + ,2530.2 + ,107.4 + ,111.9 + ,103.4 + ,2508.1 + ,109.1 + ,108.9 + ,102.1 + ,2616.8 + ,109.5 + ,105.6 + ,110.1 + ,2534.1 + ,111.4 + ,107.8 + ,83.2 + ,2181.8 + ,110.1 + ,97.5 + ,82.7 + ,2578.9 + ,117 + ,102.4 + ,106.8 + ,2841.9 + ,129.6 + ,105.6 + ,113.7 + ,2529.9 + ,113.5 + ,99.8 + ,102.5 + ,2103.2 + ,113.3 + ,96.2 + ,96.6 + ,2326.2 + ,110.1 + ,113.1 + ,92.1 + ,2452.6 + ,107.4 + ,107.4 + ,95.6 + ,2782.1 + ,110.1 + ,116.8 + ,102.3 + ,2727.3 + ,112.5 + ,112.9 + ,98.6 + ,2648.2 + ,106 + ,105.3 + ,98.2 + ,2760.7 + ,117.6 + ,109.3 + ,104.5 + ,2613 + ,117.8 + ,107.9 + ,84 + ,2225.4 + ,113.5 + ,101.1 + ,73.8 + ,2713.9 + ,121.2 + ,114.7 + ,103.9 + ,2923.3 + ,130.4 + ,116.2 + ,106 + ,2707 + ,115.2 + ,108.4 + ,97.2 + ,2473.9 + ,117.9 + ,113.4 + ,102.6 + ,2521 + ,110.7 + ,108.7 + ,89 + ,2531.8 + ,107.6 + ,112.6 + ,93.8 + ,3068.8 + ,124.3 + ,124.2 + ,116.7 + ,2826.9 + ,115.1 + ,114.9 + ,106.8 + ,2674.2 + ,112.5 + ,110.5 + ,98.5 + ,2966.6 + ,127.9 + ,121.5 + ,118.7 + ,2798.8 + ,117.4 + ,118.1 + ,90 + ,2629.6 + ,119.3 + ,111.7 + ,91.9 + ,3124.6 + ,130.4 + ,132.7 + ,113.3 + ,3115.7 + ,126 + ,119 + ,113.1 + ,3083 + ,125.4 + ,116.7 + ,104.1 + ,2863.9 + ,130.5 + ,120.1 + ,108.7 + ,2728.7 + ,115.9 + ,113.4 + ,96.7 + ,2789.4 + ,108.7 + ,106.6 + ,101 + ,3225.7 + ,124 + ,116.3 + ,116.9 + ,3148.2 + ,119.4 + ,112.6 + ,105.8 + ,2836.5 + ,118.6 + ,111.6 + ,99 + ,3153.5 + ,131.3 + ,125.1 + ,129.4 + ,2656.9 + ,111.1 + ,110.7 + ,83 + ,2834.7 + ,124.8 + ,109.6 + ,88.9 + ,3172.5 + ,132.3 + ,114.2 + ,115.9 + ,2998.8 + ,126.7 + ,113.4 + ,104.2 + ,3103.1 + ,131.7 + ,116 + ,113.4 + ,2735.6 + ,130.9 + ,109.6 + ,112.2 + ,2818.1 + ,122.1 + ,117.8 + ,100.8 + ,2874.4 + ,113.2 + ,115.8 + ,107.3 + ,3438.5 + ,133.6 + ,125.3 + ,126.6 + ,2949.1 + ,119.2 + ,113 + ,102.9 + ,3306.8 + ,129.4 + ,120.5 + ,117.9 + ,3530 + ,131.4 + ,116.6 + ,128.8 + ,3003.8 + ,117.1 + ,111.8 + ,87.5 + ,3206.4 + ,130.5 + ,115.2 + ,93.8 + ,3514.6 + ,132.3 + ,118.6 + ,122.7 + ,3522.6 + ,140.8 + ,122.4 + ,126.2 + ,3525.5 + ,137.5 + ,116.4 + ,124.6 + ,2996.2 + ,128.6 + ,114.5 + ,116.7 + ,3231.1 + ,126.7 + ,119.8 + ,115.2 + ,3030 + ,120.8 + ,115.8 + ,111.1 + ,3541.7 + ,139.3 + ,127.8 + ,129.9 + ,3113.2 + ,128.6 + ,118.8 + ,113.3 + ,3390.8 + ,131.3 + ,119.7 + ,118.5 + ,3424.2 + ,136.3 + ,118.6 + ,137.9 + ,3079.8 + ,128.8 + ,120.8 + ,103.6 + ,3123.4 + ,133.2 + ,115.9 + ,101.7 + ,3317.1 + ,136.3 + ,109.7 + ,127.4 + ,3579.9 + ,151.1 + ,114.8 + ,137.5 + ,3317.9 + ,145 + ,116.2 + ,128.3 + ,2668.1 + ,134.4 + ,112.2 + ,118.2) + ,dim=c(4 + ,84) + ,dimnames=list(c('Uitvoer_Duitsland' + ,'Voeding_dranken' + ,'Chemische_rubber_kunststof' + ,'Metaalverwerking ') + ,1:84)) > y <- array(NA,dim=c(4,84),dimnames=list(c('Uitvoer_Duitsland','Voeding_dranken','Chemische_rubber_kunststof','Metaalverwerking '),1:84)) > 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/16vgq1228940639.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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 = 8.2525, p-value = 2.220e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6139704 > 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/23lzb1228940639.tab") > > system("convert tmp/16vgq1228940639.ps tmp/16vgq1228940639.png") > > > proc.time() user system elapsed 0.538 0.228 0.637