R version 2.8.1 (2008-12-22) 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(423.4 + ,11881.4 + ,286.1 + ,10469.5 + ,404.1 + ,10374.2 + ,307 + ,10505.2 + ,500 + ,13828 + ,358.1 + ,12301.8 + ,472.6 + ,13490.5 + ,341.8 + ,12441 + ,496.1 + ,13092.2 + ,378.8 + ,12541.4 + ,562 + ,13184.4 + ,375.2 + ,13015.9 + ,434.8 + ,12398.4 + ,295.6 + ,11940.2 + ,538.2 + ,13882.3 + ,362.7 + ,13585.3 + ,577.6 + ,15861.5 + ,409.6 + ,15245.2 + ,518.1 + ,13286.1 + ,336.8 + ,12523.4 + ,625.2 + ,15634.9 + ,389.1 + ,14941.8 + ,561.2 + ,14211 + ,389.3 + ,13698.3 + ,523.3 + ,13646.8 + ,355.9 + ,12477.6 + ,536.1 + ,12224.6 + ,542 + ,13139.7 + ,607.3 + ,15916.4 + ,648.4 + ,14532.2 + ,637.3 + ,16535.9 + ,452 + ,15167 + ,606.9 + ,15796 + ,582.4 + ,16071.1 + ,652.9 + ,14418.6 + ,506.5 + ,14827.5 + ,617.2 + ,15044.5 + ,555.5 + ,15082 + ,670.4 + ,14944.2 + ,530.4 + ,14772.7 + ,729.9 + ,16754.8 + ,609.4 + ,16083 + ,677.2 + ,14254 + ,543.9 + ,14272.5 + ,710 + ,15454.9 + ,616.2 + ,15223.3 + ,844.3 + ,15644.8 + ,634.6 + ,14897.3 + ,748.2 + ,14568.3 + ,541.7 + ,13062.6 + ,653.9 + ,12520.2 + ,549.8 + ,12603.8 + ,742.6 + ,14803 + ,627.6 + ,13629.8 + ,854.2 + ,15873.2 + ,797.4 + ,14421.1 + ,808.4 + ,14755.3 + ,689.8 + ,13978.3 + ,1819 + ,12875.1 + ,1576.6 + ,12927.9 + ,1936.5 + ,14291.1 + ,1572.1 + ,13429.9 + ,1966.1 + ,14205.3 + ,1626.4 + ,13470.1 + ,2083.1 + ,15859.4 + ,1972.4 + ,14785.8 + ,1620.1 + ,15258.9 + ,1509.6 + ,14292 + ,1527.6 + ,15498.6 + ,1584.9 + ,14308.8 + ,1795 + ,15106.5 + ,1880 + ,14013 + ,1685.1 + ,15023.6 + ,1324 + ,13240.9 + ,1851.8 + ,12083 + ,1777.7 + ,12153.4 + ,2164.4 + ,15761.3 + ,2172.4 + ,14289.7 + ,1981.8 + ,16943 + ,1780.3 + ,15669.2 + ,1726.5 + ,15070.3 + ,2134.9 + ,14169.5 + ,2144.6 + ,13659.6 + ,1838.4 + ,14569.8 + ,1758.2 + ,14768.9 + ,1557 + ,14469.1 + ,1672.9 + ,14725.1 + ,1755.2 + ,14264.9 + ,1837.3 + ,15998.1 + ,1702 + ,15320.9 + ,1596.1 + ,15370.6 + ,1577.5 + ,14433.5 + ,1446.0 + ,14956.9 + ,1485.9 + ,13691.5 + ,1898.4 + ,15469.7 + ,2179.1 + ,14194.1 + ,1964.1 + ,15101.8 + ,1740.9 + ,13519.2 + ,1755.9 + ,11703.7 + ,1724.5 + ,11857.9 + ,2255.3 + ,16283.6 + ,2328.1 + ,14615.9 + ,1881.2 + ,16726.5 + ,1774.1 + ,15643.4 + ,2117.9 + ,14968.9 + ,2224.2 + ,14077.2 + ,1656.5 + ,14861 + ,1536.3 + ,14887.5 + ,1544.1 + ,14583.3 + ,1521.2 + ,14159.9 + ,2098.9 + ,15305.8 + ,2051.8 + ,14643 + ,2133.3 + ,17903.9 + ,2483.1 + ,17192.5 + ,1963.5 + ,16379.4 + ,1929.8 + ,15386.1 + ,1801.2 + ,15420.3 + ,1808.6 + ,14287.1 + ,2365.4 + ,17870.5 + ,2584.9 + ,17526.6 + ,1936.5 + ,15912.8 + ,1997.9 + ,14497 + ,1667.6 + ,13866.5 + ,1639.9 + ,14398.3 + ,1983.5 + ,17823.2 + ,2379.1 + ,16629.6 + ,2058.6 + ,17872 + ,1715 + ,16670.7 + ,2448.3 + ,17420.4 + ,2750.9 + ,16614.8 + ,1858.1 + ,16704.4 + ,1865.4 + ,16869.2 + ,1625.4 + ,15991.2 + ,1647.4 + ,15663.9 + ,2130.6 + ,16583.6 + ,2180.4 + ,16359.9 + ,2515.7 + ,19123.5 + ,2593 + ,18447.7 + ,2230.2 + ,17838.7 + ,2057.2 + ,16889 + ,2086.9 + ,17209.4 + ,2635.8 + ,16505 + ,2235.0 + ,18586.5 + ,2315.4 + ,18320.9 + ,2100.2 + ,16258.1 + ,1863.6 + ,15052.1 + ,2288.6 + ,15141.6 + ,2038 + ,15699.8 + ,2490.0 + ,19202.1 + ,2235.8 + ,18135.3 + ,2573.7 + ,17746.5 + ,2222.1 + ,16768.7 + ,2543.8 + ,19090.1 + ,2636.9 + ,18883 + ,2004.7 + ,18040.3 + ,2076.8 + ,19021 + ,2390.0 + ,17515.5 + ,1935.5 + ,18101.9 + ,2338.4 + ,17751.8 + ,2086.3 + ,17776.1 + ,2724.5 + ,21072.4 + ,2470.9 + ,21489.9 + ,2292.5 + ,17170 + ,1854.6 + ,17065.3 + ,2386 + ,19439.5 + ,2041.3 + ,18690 + ,2477.9 + ,19795.4 + ,2170.8 + ,18953.1 + ,2337 + ,17574.9 + ,1905.5 + ,16398.9 + ,2605.1 + ,16165.4 + ,2130.2 + ,16895.6 + ,2560.8 + ,19464.6 + ,2791.2 + ,18553 + ,2839.3 + ,19932.1 + ,2539.7 + ,19270 + ,2407.2 + ,19961.2 + ,2661.3 + ,19422.1 + ,2085.2 + ,17343.4 + ,1764.9 + ,17579.4 + ,2735.6 + ,18924.2 + ,2176.9 + ,18637.3 + ,2798.7 + ,18574.1 + ,2458.5 + ,18076.7 + ,3053.2 + ,21350.6 + ,2179 + ,20438.6 + ,2405 + ,18594.6 + ,2242.5 + ,18075.2 + ,2471.9 + ,19823.1 + ,2089.6 + ,19563 + ,2727.3 + ,20844.4 + ,2661.6 + ,19899.2 + ,2790.7 + ,19640.2 + ,2112 + ,19227.5 + ,2385.4 + ,17735.4 + ,2367.3 + ,17789.6 + ,3206.6 + ,19813.6 + ,2543 + ,19220.8 + ,2705.6 + ,22160 + ,2603.9 + ,21968.9 + ,3518.4 + ,20664.3 + ,3146.7 + ,21131.5 + ,1954.9 + ,17877.4 + ,1789.2 + ,19484.6 + ,2584.3 + ,20906.5 + ,2114.8 + ,22168.7 + ,2535.8 + ,21164.1 + ,2236.3 + ,20866.8 + ,2685.9 + ,21374.4 + ,2288.1 + ,22176.2 + ,2866 + ,22952.3 + ,2173.2 + ,23533.8 + ,2236.6 + ,21343.5 + ,1877.7 + ,21479.6 + ,2934.9 + ,23899.3 + ,2807.4 + ,24347.7 + ,2668.6 + ,22392.9 + ,2357.4 + ,22751.6 + ,2371.2 + ,18274.1 + ,2107.7 + ,20328.3 + ,3165.9 + ,22786.7 + ,2856.8 + ,23650.4 + ,2887.2 + ,22321.5 + ,2510.8 + ,23335.7 + ,3112.2 + ,17842.2 + ,2875 + ,19614.9 + ,2671.2 + ,16373.5 + ,2229.7 + ,18042.3 + ,2432.6 + ,15993.8 + ,2055.1 + ,17282.5 + ,2812.3 + ,16446.1 + ,2545.4 + ,16847.2 + ,3095.7 + ,17729 + ,2775.1 + ,18159.5 + ,2862.9 + ,16643 + ,2252.2 + ,16540.9 + ,2607.3 + ,16196.7 + ,2091.7 + ,15952.7 + ,2862.5 + ,18252.1 + ,2433 + ,18357.8) + ,dim=c(4 + ,120) + ,dimnames=list(c('Bel._Exp._Farm._Prod.' + ,'Bel._Exp._Tot.' + ,'Bel._Imp._Farm._Prod.' + ,'Bel._Imp._Tot.') + ,1:120)) > y <- array(NA,dim=c(4,120),dimnames=list(c('Bel._Exp._Farm._Prod.','Bel._Exp._Tot.','Bel._Imp._Farm._Prod.','Bel._Imp._Tot.'),1:120)) > 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/rcomp/tmp/1xzte1257887679.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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 = 10.0733, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6220324 > 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/rcomp/tmp/27i8z1257887679.tab") > > system("convert tmp/1xzte1257887679.ps tmp/1xzte1257887679.png") > > > proc.time() user system elapsed 0.560 0.400 0.882