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(6 + ,73 + ,62 + ,66 + ,4 + ,58 + ,54 + ,54 + ,5 + ,68 + ,41 + ,82 + ,4 + ,62 + ,49 + ,61 + ,4 + ,65 + ,49 + ,65 + ,6 + ,81 + ,72 + ,77 + ,6 + ,73 + ,78 + ,66 + ,4 + ,64 + ,58 + ,66 + ,4 + ,68 + ,58 + ,66 + ,6 + ,51 + ,23 + ,48 + ,4 + ,68 + ,39 + ,57 + ,6 + ,61 + ,63 + ,80 + ,5 + ,69 + ,46 + ,60 + ,4 + ,73 + ,58 + ,70 + ,6 + ,61 + ,39 + ,85 + ,3 + ,62 + ,44 + ,59 + ,5 + ,63 + ,49 + ,72 + ,6 + ,69 + ,57 + ,70 + ,4 + ,47 + ,76 + ,74 + ,6 + ,66 + ,63 + ,70 + ,2 + ,58 + ,18 + ,51 + ,7 + ,63 + ,40 + ,70 + ,5 + ,69 + ,59 + ,71 + ,2 + ,59 + ,62 + ,72 + ,4 + ,59 + ,70 + ,50 + ,4 + ,63 + ,65 + ,69 + ,6 + ,65 + ,56 + ,73 + ,6 + ,65 + ,45 + ,66 + ,5 + ,71 + ,57 + ,73 + ,6 + ,60 + ,50 + ,58 + ,6 + ,81 + ,40 + ,78 + ,4 + ,67 + ,58 + ,83 + ,6 + ,66 + ,49 + ,76 + ,6 + ,62 + ,49 + ,77 + ,6 + ,63 + ,27 + ,79 + ,2 + ,73 + ,51 + ,71 + ,4 + ,55 + ,75 + ,79 + ,5 + ,59 + ,65 + ,60 + ,3 + ,64 + ,47 + ,73 + ,7 + ,63 + ,49 + ,70 + ,5 + ,64 + ,65 + ,42 + ,3 + ,73 + ,61 + ,74 + ,8 + ,54 + ,46 + ,68 + ,8 + ,76 + ,69 + ,83 + ,5 + ,74 + ,55 + ,62 + ,6 + ,63 + ,78 + ,79 + ,3 + ,73 + ,58 + ,61 + ,5 + ,67 + ,34 + ,86 + ,4 + ,68 + ,67 + ,64 + ,5 + ,66 + ,45 + ,75 + ,5 + ,62 + ,68 + ,59 + ,6 + ,71 + ,49 + ,82 + ,5 + ,63 + ,19 + ,61 + ,6 + ,75 + ,72 + ,69 + ,6 + ,77 + ,59 + ,60 + ,4 + ,62 + ,46 + ,59 + ,8 + ,74 + ,56 + ,81 + ,6 + ,67 + ,45 + ,65 + ,4 + ,56 + ,53 + ,60 + ,6 + ,60 + ,67 + ,60 + ,5 + ,58 + ,73 + ,45 + ,5 + ,65 + ,46 + ,75 + ,6 + ,49 + ,70 + ,84 + ,6 + ,61 + ,38 + ,77 + ,6 + ,66 + ,54 + ,64 + ,6 + ,64 + ,46 + ,54 + ,6 + ,65 + ,46 + ,72 + ,6 + ,46 + ,45 + ,56 + ,7 + ,65 + ,47 + ,67 + ,4 + ,81 + ,25 + ,81 + ,4 + ,72 + ,63 + ,73 + ,3 + ,65 + ,46 + ,67 + ,6 + ,74 + ,69 + ,72 + ,5 + ,59 + ,43 + ,69 + ,5 + ,69 + ,49 + ,71 + ,3 + ,58 + ,39 + ,77 + ,5 + ,71 + ,65 + ,63 + ,4 + ,79 + ,54 + ,49 + ,3 + ,68 + ,50 + ,74 + ,7 + ,66 + ,42 + ,76 + ,4 + ,62 + ,45 + ,65 + ,4 + ,69 + ,50 + ,65 + ,5 + ,63 + ,55 + ,69 + ,6 + ,62 + ,38 + ,71 + ,2 + ,61 + ,40 + ,68 + ,2 + ,65 + ,51 + ,49 + ,6 + ,64 + ,49 + ,86 + ,4 + ,56 + ,39 + ,63 + ,5 + ,56 + ,57 + ,77 + ,6 + ,48 + ,30 + ,52 + ,7 + ,74 + ,51 + ,73 + ,8 + ,69 + ,48 + ,63 + ,6 + ,62 + ,56 + ,54 + ,6 + ,73 + ,66 + ,56 + ,3 + ,64 + ,72 + ,54 + ,7 + ,57 + ,28 + ,61 + ,3 + ,57 + ,52 + ,70 + ,6 + ,60 + ,53 + ,68 + ,4 + ,61 + ,70 + ,63 + ,4 + ,72 + ,63 + ,76 + ,6 + ,57 + ,46 + ,69 + ,6 + ,51 + ,45 + ,71 + ,6 + ,63 + ,68 + ,39 + ,4 + ,54 + ,54 + ,54 + ,7 + ,72 + ,60 + ,64 + ,5 + ,62 + ,50 + ,70 + ,7 + ,68 + ,66 + ,76 + ,4 + ,62 + ,56 + ,71 + ,6 + ,63 + ,54 + ,73 + ,6 + ,77 + ,72 + ,81 + ,6 + ,57 + ,34 + ,50 + ,5 + ,57 + ,39 + ,42 + ,5 + ,61 + ,66 + ,66 + ,6 + ,65 + ,27 + ,77 + ,7 + ,63 + ,63 + ,62 + ,4 + ,66 + ,65 + ,66 + ,4 + ,68 + ,63 + ,69 + ,8 + ,72 + ,49 + ,72 + ,6 + ,68 + ,42 + ,67 + ,3 + ,59 + ,51 + ,59 + ,4 + ,56 + ,50 + ,66 + ,5 + ,62 + ,64 + ,68 + ,5 + ,72 + ,68 + ,72 + ,6 + ,68 + ,66 + ,73 + ,8 + ,67 + ,59 + ,69 + ,2 + ,54 + ,32 + ,57 + ,4 + ,69 + ,62 + ,55 + ,7 + ,61 + ,52 + ,72 + ,5 + ,55 + ,34 + ,68 + ,6 + ,75 + ,63 + ,83 + ,6 + ,55 + ,48 + ,74 + ,4 + ,49 + ,53 + ,72 + ,5 + ,54 + ,39 + ,66 + ,6 + ,66 + ,51 + ,61 + ,6 + ,73 + ,60 + ,86 + ,6 + ,63 + ,70 + ,81 + ,6 + ,61 + ,40 + ,79 + ,5 + ,74 + ,61 + ,73 + ,5 + ,81 + ,35 + ,59 + ,6 + ,62 + ,39 + ,64 + ,4 + ,64 + ,31 + ,75 + ,6 + ,62 + ,36 + ,68 + ,3 + ,85 + ,51 + ,84 + ,6 + ,74 + ,55 + ,68 + ,8 + ,51 + ,67 + ,68 + ,4 + ,66 + ,40 + ,69) + ,dim=c(4 + ,146) + ,dimnames=list(c('Celebrity' + ,'TotNV' + ,'TotANX' + ,'TotGR') + ,1:146)) > y <- array(NA,dim=c(4,146),dimnames=list(c('Celebrity','TotNV','TotANX','TotGR'),1:146)) > 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' > par1 <- 'kendall' > #'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/133fz1292183829.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") > > n <- length(y[,1]) > n [1] 4 > 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/2olwn1292183829.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.0691, p-value = 0.2850 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.06665489 > 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) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 2: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 3: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 4: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 5: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 6: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/32duw1292183829.tab") > > try(system("convert tmp/133fz1292183829.ps tmp/133fz1292183829.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.666 0.253 1.384