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(695 + ,0 + ,641 + ,696 + ,729 + ,839 + ,627 + ,608 + ,638 + ,0 + ,695 + ,641 + ,696 + ,729 + ,696 + ,651 + ,762 + ,0 + ,638 + ,695 + ,641 + ,696 + ,825 + ,691 + ,635 + ,0 + ,762 + ,638 + ,695 + ,641 + ,677 + ,627 + ,721 + ,0 + ,635 + ,762 + ,638 + ,695 + ,656 + ,634 + ,854 + ,0 + ,721 + ,635 + ,762 + ,638 + ,785 + ,731 + ,418 + ,0 + ,854 + ,721 + ,635 + ,762 + ,412 + ,475 + ,367 + ,0 + ,418 + ,854 + ,721 + ,635 + ,352 + ,337 + ,824 + ,0 + ,367 + ,418 + ,854 + ,721 + ,839 + ,803 + ,687 + ,0 + ,824 + ,367 + ,418 + ,854 + ,729 + ,722 + ,601 + ,0 + ,687 + ,824 + ,367 + ,418 + ,696 + ,590 + ,676 + ,0 + ,601 + ,687 + ,824 + ,367 + ,641 + ,724 + ,740 + ,0 + ,676 + ,601 + ,687 + ,824 + ,695 + ,627 + ,691 + ,0 + ,740 + ,676 + ,601 + ,687 + ,638 + ,696 + ,683 + ,0 + ,691 + ,740 + ,676 + ,601 + ,762 + ,825 + ,594 + ,0 + ,683 + ,691 + ,740 + ,676 + ,635 + ,677 + ,729 + ,0 + ,594 + ,683 + ,691 + ,740 + ,721 + ,656 + ,731 + ,0 + ,729 + ,594 + ,683 + ,691 + ,854 + ,785 + ,386 + ,0 + ,731 + ,729 + ,594 + ,683 + ,418 + ,412 + ,331 + ,0 + ,386 + ,731 + ,729 + ,594 + ,367 + ,352 + ,706 + ,0 + ,331 + ,386 + ,731 + ,729 + ,824 + ,839 + ,715 + ,0 + ,706 + ,331 + ,386 + ,731 + ,687 + ,729 + ,657 + ,0 + ,715 + ,706 + ,331 + ,386 + ,601 + ,696 + ,653 + ,0 + ,657 + ,715 + ,706 + ,331 + ,676 + ,641 + ,642 + ,0 + ,653 + ,657 + ,715 + ,706 + ,740 + ,695 + ,643 + ,0 + ,642 + ,653 + ,657 + ,715 + ,691 + ,638 + ,718 + ,0 + ,643 + ,642 + ,653 + ,657 + ,683 + ,762 + ,654 + ,0 + ,718 + ,643 + ,642 + ,653 + ,594 + ,635 + ,632 + ,0 + ,654 + ,718 + ,643 + ,642 + ,729 + ,721 + ,731 + ,0 + ,632 + ,654 + ,718 + ,643 + ,731 + ,854 + ,392 + ,1 + ,731 + ,632 + ,654 + ,718 + ,386 + ,418 + ,344 + ,1 + ,392 + ,731 + ,632 + ,654 + ,331 + ,367 + ,792 + ,1 + ,344 + ,392 + ,731 + ,632 + ,706 + ,824 + ,852 + ,1 + ,792 + ,344 + ,392 + ,731 + ,715 + ,687 + ,649 + ,1 + ,852 + ,792 + ,344 + ,392 + ,657 + ,601 + ,629 + ,1 + ,649 + ,852 + ,792 + ,344 + ,653 + ,676 + ,685 + ,1 + ,629 + ,649 + ,852 + ,792 + ,642 + ,740 + ,617 + ,1 + ,685 + ,629 + ,649 + ,852 + ,643 + ,691 + ,715 + ,1 + ,617 + ,685 + ,629 + ,649 + ,718 + ,683 + ,715 + ,1 + ,715 + ,617 + ,685 + ,629 + ,654 + ,594 + ,629 + ,1 + ,715 + ,715 + ,617 + ,685 + ,632 + ,729 + ,916 + ,1 + ,629 + ,715 + ,715 + ,617 + ,731 + ,731 + ,531 + ,1 + ,916 + ,629 + ,715 + ,715 + ,392 + ,386 + ,357 + ,1 + ,531 + ,916 + ,629 + ,715 + ,344 + ,331 + ,917 + ,1 + ,357 + ,531 + ,916 + ,629 + ,792 + ,706 + ,828 + ,1 + ,917 + ,357 + ,531 + ,916 + ,852 + ,715 + ,708 + ,1 + ,828 + ,917 + ,357 + ,531 + ,649 + ,657 + ,858 + ,1 + ,708 + ,828 + ,917 + ,357 + ,629 + ,653 + ,775 + ,1 + ,858 + ,708 + ,828 + ,917 + ,685 + ,642 + ,785 + ,1 + ,775 + ,858 + ,708 + ,828 + ,617 + ,643 + ,1006 + ,1 + ,785 + ,775 + ,858 + ,708 + ,715 + ,718 + ,789 + ,1 + ,1006 + ,785 + ,775 + ,858 + ,715 + ,654 + ,734 + ,1 + ,789 + ,1006 + ,785 + ,775 + ,629 + ,632 + ,906 + ,1 + ,734 + ,789 + ,1006 + ,785 + ,916 + ,731 + ,532 + ,1 + ,906 + ,734 + ,789 + ,1006 + ,531 + ,392 + ,387 + ,1 + ,532 + ,906 + ,734 + ,789 + ,357 + ,344 + ,991 + ,1 + ,387 + ,532 + ,906 + ,734 + ,917 + ,792 + ,841 + ,1 + ,991 + ,387 + ,532 + ,906 + ,828 + ,852 + ,892 + ,1 + ,841 + ,991 + ,387 + ,532 + ,708 + ,649 + ,782 + ,1 + ,892 + ,841 + ,991 + ,387 + ,858 + ,629) + ,dim=c(8 + ,60) + ,dimnames=list(c('faillissement' + ,'crisis' + ,'t-1' + ,'t-2' + ,'t-3' + ,'t-4' + ,'t-12' + ,'t-24 ') + ,1:60)) > y <- array(NA,dim=c(8,60),dimnames=list(c('faillissement','crisis','t-1','t-2','t-3','t-4','t-12','t-24 '),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'kendall' > main = 'Correlation Matrix' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > 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=par1) + 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/19q1a1292955410.ps",horizontal=F,onefile=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") > > n <- length(y[,1]) > n [1] 8 > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ',header=TRUE) > for (i in 1:n) { + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + } > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + for (j in 1:n) { + r <- cor.test(y[i,],y[j,],method=par1) + a<-table.element(a,round(r$estimate,3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2nizj1292955410.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'Pearson r',1,TRUE) > a<-table.element(a,'Spearman rho',1,TRUE) > a<-table.element(a,'Kendall tau',1,TRUE) > a<-table.row.end(a) > cor.test(y[1,],y[2,],method=par1) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 1.9961, p-value = 0.04593 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.214225 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') + a<-table.element(a,dum,header=TRUE) + rp <- cor.test(y[i,],y[j,],method='pearson') + a<-table.element(a,round(rp$estimate,4)) + rs <- cor.test(y[i,],y[j,],method='spearman') + a<-table.element(a,round(rs$estimate,4)) + rk <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,round(rk$estimate,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-value',header=T) + a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) + a<-table.row.end(a) + } + } There were 28 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3rjfo1292955410.tab") > > try(system("convert tmp/19q1a1292955410.ps tmp/19q1a1292955410.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.066 0.374 2.193