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(13807.9 + ,3258.1 + ,2236 + ,156.3 + ,14101.7 + ,3140.1 + ,2084.9 + ,151.5 + ,16010.3 + ,3627.4 + ,2409.5 + ,159.1 + ,14633.1 + ,3279.4 + ,2199.3 + ,166.9 + ,14478.5 + ,3204 + ,2203.5 + ,160.5 + ,15327.3 + ,3515.6 + ,2254.1 + ,162.8 + ,14179.5 + ,3146.6 + ,1975.8 + ,178.9 + ,11398.2 + ,2271.7 + ,1742.2 + ,148.5 + ,16111.5 + ,3627.9 + ,2520.6 + ,184.1 + ,15887.4 + ,3553.4 + ,2438.1 + ,197 + ,14529.3 + ,3018.3 + ,2126.3 + ,186.8 + ,13923.1 + ,3355.4 + ,2267.5 + ,139.2 + ,13960.2 + ,3242 + ,2201.1 + ,162.7 + ,14807.8 + ,3311.1 + ,2128.5 + ,187.5 + ,17511.5 + ,4125.2 + ,2596 + ,235.8 + ,15845.9 + ,3423 + ,2458.2 + ,219.4 + ,14594.2 + ,3120.3 + ,2210.5 + ,212.4 + ,17252.2 + ,3863 + ,2621.2 + ,220.2 + ,14832.8 + ,3240.8 + ,2231.4 + ,197.5 + ,13132.1 + ,2837.4 + ,2103.6 + ,185.6 + ,17665.9 + ,3945 + ,2685.8 + ,232.4 + ,16913 + ,3684.1 + ,2539.3 + ,223.8 + ,17318.8 + ,3659.6 + ,2462.4 + ,219.4 + ,16224.2 + ,3769.6 + ,2693.3 + ,191.4 + ,15469.6 + ,3592.7 + ,2307.7 + ,210.4 + ,16557.5 + ,3754 + ,2385.9 + ,212.6 + ,19414.8 + ,4507.8 + ,2737.6 + ,274.4 + ,17335 + ,3853.2 + ,2653.9 + ,256 + ,16525.2 + ,3817.2 + ,2545.4 + ,227.6 + ,18160.4 + ,3958.4 + ,2848.8 + ,261.7 + ,15553.8 + ,3428.9 + ,2359.5 + ,237 + ,15262.2 + ,3125.7 + ,2488.3 + ,234.9 + ,18581 + ,3977 + ,2861.1 + ,310.6 + ,17564.1 + ,3983.3 + ,2717.9 + ,274.2 + ,18948.6 + ,4299.6 + ,2844 + ,288.1 + ,17187.8 + ,4306.9 + ,2749 + ,242.5 + ,17564.8 + ,4259.5 + ,2652.9 + ,271.7 + ,17668.4 + ,3986 + ,2660.2 + ,282.2 + ,20811.7 + ,4755.6 + ,3187.1 + ,317.4 + ,17257.8 + ,3925.6 + ,2774.1 + ,280.3 + ,18984.2 + ,4206.5 + ,3158.2 + ,322.6 + ,20532.6 + ,4323.4 + ,3244.6 + ,328.2 + ,17082.3 + ,3816.1 + ,2665.5 + ,280.7 + ,16894.9 + ,3410.7 + ,2820.8 + ,288.8 + ,20274.9 + ,4227.4 + ,2983.4 + ,347.9 + ,20078.6 + ,4296.9 + ,3077.4 + ,360.1 + ,19900.9 + ,4351.7 + ,3024.8 + ,348 + ,17012.2 + ,3800 + ,2731.8 + ,275.7 + ,19642.9 + ,4277 + ,3046.2 + ,332.6 + ,19024 + ,4100.2 + ,2834.8 + ,340.8 + ,21691 + ,4672.5 + ,3292.8 + ,390.5 + ,18835.9 + ,4189.9 + ,2946.1 + ,351.2 + ,19873.4 + ,4231.9 + ,3196.9 + ,377.4 + ,21468.2 + ,4654.9 + ,3284.2 + ,413.5 + ,19406.8 + ,4298.5 + ,3003 + ,366.9 + ,18385.3 + ,3635.9 + ,2979 + ,364.8 + ,20739.3 + ,4505.1 + ,3137.4 + ,388 + ,22268.3 + ,4891.9 + ,3630.2 + ,429.8 + ,21569 + ,4894.2 + ,3270.7 + ,423.6 + ,17514.8 + ,4093.2 + ,2942.3 + ,326.4) + ,dim=c(4 + ,60) + ,dimnames=list(c('Total_export_EU' + ,'Total_export_France' + ,'Total_export_Netherlands' + ,'Total_export_Poland') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Total_export_EU','Total_export_France','Total_export_Netherlands','Total_export_Poland'),1:60)) > 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/freestat/rcomp/tmp/1w1vu1229087153.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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 = 9.1459, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8101695 > 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/freestat/rcomp/tmp/2w6021229087153.tab") > > system("convert tmp/1w1vu1229087153.ps tmp/1w1vu1229087153.png") > > > proc.time() user system elapsed 0.714 0.284 0.822