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(3032.93 + ,10967.87 + ,10070 + ,32.68 + ,3045.78 + ,10433.56 + ,10137 + ,31.54 + ,3110.52 + ,10665.78 + ,9984 + ,32.43 + ,3013.24 + ,10666.71 + ,9732 + ,26.54 + ,2987.1 + ,10682.74 + ,9103 + ,25.85 + ,2995.55 + ,10777.22 + ,9155 + ,27.6 + ,2833.18 + ,10052.6 + ,9308 + ,25.71 + ,2848.96 + ,10213.97 + ,9394 + ,25.38 + ,2794.83 + ,10546.82 + ,9948 + ,28.57 + ,2845.26 + ,10767.2 + ,10177 + ,27.64 + ,2915.02 + ,10444.5 + ,10002 + ,25.36 + ,2892.63 + ,10314.68 + ,9728 + ,25.9 + ,2604.42 + ,9042.56 + ,10002 + ,26.29 + ,2641.65 + ,9220.75 + ,10063 + ,21.74 + ,2659.81 + ,9721.84 + ,10018 + ,19.2 + ,2638.53 + ,9978.53 + ,9960 + ,19.32 + ,2720.25 + ,9923.81 + ,10236 + ,19.82 + ,2745.88 + ,9892.56 + ,10893 + ,20.36 + ,2735.7 + ,10500.98 + ,10756 + ,24.31 + ,2811.7 + ,10179.35 + ,10940 + ,25.97 + ,2799.43 + ,10080.48 + ,10997 + ,25.61 + ,2555.28 + ,9492.44 + ,10827 + ,24.67 + ,2304.98 + ,8616.49 + ,10166 + ,25.59 + ,2214.95 + ,8685.4 + ,10186 + ,26.09 + ,2065.81 + ,8160.67 + ,10457 + ,28.37 + ,1940.49 + ,8048.1 + ,10368 + ,27.34 + ,2042 + ,8641.21 + ,10244 + ,24.46 + ,1995.37 + ,8526.63 + ,10511 + ,27.46 + ,1946.81 + ,8474.21 + ,10812 + ,30.23 + ,1765.9 + ,7916.13 + ,10738 + ,32.33 + ,1635.25 + ,7977.64 + ,10171 + ,29.87 + ,1833.42 + ,8334.59 + ,9721 + ,24.87 + ,1910.43 + ,8623.36 + ,9897 + ,25.48 + ,1959.67 + ,9098.03 + ,9828 + ,27.28 + ,1969.6 + ,9154.34 + ,9924 + ,28.24 + ,2061.41 + ,9284.73 + ,10371 + ,29.58 + ,2093.48 + ,9492.49 + ,10846 + ,26.95 + ,2120.88 + ,9682.35 + ,10413 + ,29.08 + ,2174.56 + ,9762.12 + ,10709 + ,28.76 + ,2196.72 + ,10124.63 + ,10662 + ,29.59 + ,2350.44 + ,10540.05 + ,10570 + ,30.7 + ,2440.25 + ,10601.61 + ,10297 + ,30.52 + ,2408.64 + ,10323.73 + ,10635 + ,32.67 + ,2472.81 + ,10418.4 + ,10872 + ,33.19 + ,2407.6 + ,10092.96 + ,10296 + ,37.13 + ,2454.62 + ,10364.91 + ,10383 + ,35.54 + ,2448.05 + ,10152.09 + ,10431 + ,37.75 + ,2497.84 + ,10032.8 + ,10574 + ,41.84 + ,2645.64 + ,10204.59 + ,10653 + ,42.94 + ,2756.76 + ,10001.6 + ,10805 + ,49.14 + ,2849.27 + ,10411.75 + ,10872 + ,44.61 + ,2921.44 + ,10673.38 + ,10625 + ,40.22 + ,2981.85 + ,10539.51 + ,10407 + ,44.23 + ,3080.58 + ,10723.78 + ,10463 + ,45.85 + ,3106.22 + ,10682.06 + ,10556 + ,53.38 + ,3119.31 + ,10283.19 + ,10646 + ,53.26 + ,3061.26 + ,10377.18 + ,10702 + ,51.8 + ,3097.31 + ,10486.64 + ,11353 + ,55.3 + ,3161.69 + ,10545.38 + ,11346 + ,57.81 + ,3257.16 + ,10554.27 + ,11451 + ,63.96 + ,3277.01 + ,10532.54 + ,11964 + ,63.77 + ,3295.32 + ,10324.31 + ,12574 + ,59.15 + ,3363.99 + ,10695.25 + ,13031 + ,56.12 + ,3494.17 + ,10827.81 + ,13812 + ,57.42 + ,3667.03 + ,10872.48 + ,14544 + ,63.52 + ,3813.06 + ,10971.19 + ,14931 + ,61.71 + ,3917.96 + ,11145.65 + ,14886 + ,63.01 + ,3895.51 + ,11234.68 + ,16005 + ,68.18 + ,3801.06 + ,11333.88 + ,17064 + ,72.03 + ,3570.12 + ,10997.97 + ,15168 + ,69.75 + ,3701.61 + ,11036.89 + ,16050 + ,74.41 + ,3862.27 + ,11257.35 + ,15839 + ,74.33 + ,3970.1 + ,11533.59 + ,15137 + ,64.24 + ,4138.52 + ,11963.12 + ,14954 + ,60.03 + ,4199.75 + ,12185.15 + ,15648 + ,59.44 + ,4290.89 + ,12377.62 + ,15305 + ,62.5 + ,4443.91 + ,12512.89 + ,15579 + ,55.04 + ,4502.64 + ,12631.48 + ,16348 + ,58.34 + ,4356.98 + ,12268.53 + ,15928 + ,61.92 + ,4591.27 + ,12754.8 + ,16171 + ,67.65 + ,4696.96 + ,13407.75 + ,15937 + ,67.68 + ,4621.4 + ,13480.21 + ,15713 + ,70.3 + ,4562.84 + ,13673.28 + ,15594 + ,75.26 + ,4202.52 + ,13239.71 + ,15683 + ,71.44 + ,4296.49 + ,13557.69 + ,16438 + ,76.36 + ,4435.23 + ,13901.28 + ,17032 + ,81.71 + ,4105.18 + ,13200.58 + ,17696 + ,92.6 + ,4116.68 + ,13406.97 + ,17745 + ,90.6 + ,3844.49 + ,12538.12 + ,19394 + ,92.23 + ,3720.98 + ,12419.57 + ,20148 + ,94.09 + ,3674.4 + ,12193.88 + ,20108 + ,102.79 + ,3857.62 + ,12656.63 + ,18584 + ,109.65 + ,3801.06 + ,12812.48 + ,18441 + ,124.05 + ,3504.37 + ,12056.67 + ,18391 + ,132.69 + ,3032.6 + ,11322.38 + ,19178 + ,135.81 + ,3047.03 + ,11530.75 + ,18079 + ,116.07 + ,2962.34 + ,11114.08 + ,18483 + ,101.42 + ,2197.82 + ,9181.73 + ,19644 + ,75.73 + ,2014.45 + ,8614.55 + ,19195 + ,55.48) + ,dim=c(4 + ,99) + ,dimnames=list(c('Bel20' + ,'Dowjones' + ,'Goudprijs' + ,'Prijsruweolie') + ,1:99)) > y <- array(NA,dim=c(4,99),dimnames=list(c('Bel20','Dowjones','Goudprijs','Prijsruweolie'),1:99)) > 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/14d8m1229169768.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 = 11.2884, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.7698175 > 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/2veo51229169768.tab") > > system("convert tmp/14d8m1229169768.ps tmp/14d8m1229169768.png") > > > proc.time() user system elapsed 0.558 0.238 0.924