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(24710.92 + ,2180995.35 + ,4.79 + ,2.86 + ,23983.59 + ,2191117.36 + ,5.95 + ,2.55 + ,24434.12 + ,2219483.98 + ,5.46 + ,2.27 + ,23939.23 + ,2217992.79 + ,5.75 + ,2.26 + ,24290.02 + ,2209675.04 + ,5.15 + ,2.57 + ,24117.63 + ,2204327.56 + ,4.96 + ,3.07 + ,23724.64 + ,2217758.16 + ,5.28 + ,2.76 + ,22989.44 + ,2218743.78 + ,5.73 + ,2.51 + ,23716.86 + ,2231760.73 + ,5.75 + ,2.87 + ,25058.83 + ,2242745.96 + ,5.88 + ,3.14 + ,25059 + ,2269344.45 + ,6.3 + ,3.11 + ,23579.18 + ,2277708.79 + ,6.74 + ,3.16 + ,24209.03 + ,2281332.03 + ,6.75 + ,2.47 + ,24173.67 + ,2293500.47 + ,7.34 + ,2.57 + ,24706.39 + ,2319792.57 + ,6.64 + ,2.89 + ,24522.12 + ,2320736.3 + ,6.62 + ,2.63 + ,24766.15 + ,2303874.92 + ,6.32 + ,2.38 + ,25940.04 + ,2291488.94 + ,5.32 + ,1.69 + ,24985.78 + ,2299751.72 + ,5.68 + ,1.96 + ,24788 + ,2313222.41 + ,6.18 + ,2.19 + ,26544.56 + ,2314078.67 + ,5.02 + ,1.87 + ,28019.08 + ,2325555.72 + ,2.1 + ,1.6 + ,27285.71 + ,2353668.83 + ,4 + ,1.63 + ,29161.16 + ,2363959.25 + ,3 + ,1.22 + ,28357.73 + ,2366135.5 + ,4.73 + ,1.21 + ,27979.91 + ,2388164.24 + ,5.14 + ,1.49 + ,27543.95 + ,2415043.36 + ,5.81 + ,1.64 + ,27397.53 + ,2411619.15 + ,6.24 + ,1.66 + ,27623.59 + ,2400100.64 + ,4.49 + ,1.77 + ,27736.07 + ,2398536.15 + ,4.22 + ,1.82 + ,27803.79 + ,2404054.33 + ,4.88 + ,1.78 + ,27779.55 + ,2421077.9 + ,5.18 + ,1.28 + ,27524.13 + ,2430396.04 + ,5.19 + ,1.29 + ,27582.72 + ,2445739.91 + ,5.06 + ,1.37 + ,28638.95 + ,2484702.11 + ,4.65 + ,1.12 + ,28825.78 + ,2499887.85 + ,4.83 + ,1.51 + ,30132.61 + ,2506371.6 + ,4.6 + ,2.24 + ,29326.85 + ,2526847.52 + ,4.72 + ,2.94 + ,29075.62 + ,2551947.88 + ,4.33 + ,3.09 + ,28230.63 + ,2549403.15 + ,4.97 + ,3.46 + ,28118.36 + ,2533567.74 + ,5.37 + ,3.64 + ,28173.29 + ,2529577.21 + ,4.19 + ,4.39 + ,27396.91 + ,2541049.08 + ,4.54 + ,4.15 + ,24578.55 + ,2547421.64 + ,5.82 + ,5.21 + ,24504.77 + ,2555613.49 + ,5.49 + ,5.8 + ,27582.37 + ,2566290.53 + ,3.28 + ,5.91 + ,26920.31 + ,2580919.67 + ,5.11 + ,5.39 + ,25426.68 + ,2587978.57 + ,6.24 + ,5.46 + ,25390.8 + ,2580098.72 + ,6.41 + ,4.72 + ,25041.16 + ,2579086.96 + ,6.43 + ,3.14 + ,22769.42 + ,2592127.5 + ,8.42 + ,2.63 + ,22921.89 + ,2586944.73 + ,8.23 + ,2.32 + ,26267.63 + ,2548600.43 + ,3.17 + ,1.93 + ,27364.67 + ,2516994.05 + ,2.72 + ,0.62 + ,28382.59 + ,2500125.23 + ,3 + ,0.6 + ,29132.81 + ,2493360.56 + ,3.47 + ,-0.37 + ,28214.51 + ,2475571.42 + ,3.88 + ,-1.1 + ,28865.73 + ,2460157.93 + ,3.43 + ,-1.68 + ,24405.35 + ,2467502.24 + ,4.06 + ,-0.78) + ,dim=c(4 + ,59) + ,dimnames=list(c('Leningsbedrag' + ,'Schulden' + ,'Rentevoet' + ,'Inflatie') + ,1:59)) > y <- array(NA,dim=c(4,59),dimnames=list(c('Leningsbedrag','Schulden','Rentevoet','Inflatie'),1:59)) > 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/1snhi1257492202.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 = 3.3024, p-value = 0.0009585 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.2951490 > 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/2miqh1257492202.tab") > > system("convert tmp/1snhi1257492202.ps tmp/1snhi1257492202.png") > > > proc.time() user system elapsed 0.500 0.209 1.036