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(73 + ,62 + ,66 + ,58 + ,54 + ,54 + ,68 + ,41 + ,82 + ,62 + ,49 + ,61 + ,65 + ,49 + ,65 + ,81 + ,72 + ,77 + ,73 + ,78 + ,66 + ,64 + ,58 + ,66 + ,68 + ,58 + ,66 + ,51 + ,23 + ,48 + ,68 + ,39 + ,57 + ,61 + ,63 + ,80 + ,69 + ,46 + ,60 + ,73 + ,58 + ,70 + ,61 + ,39 + ,85 + ,62 + ,44 + ,59 + ,63 + ,49 + ,72 + ,69 + ,57 + ,70 + ,47 + ,76 + ,74 + ,66 + ,63 + ,70 + ,58 + ,18 + ,51 + ,63 + ,40 + ,70 + ,69 + ,59 + ,71 + ,59 + ,62 + ,72 + ,59 + ,70 + ,50 + ,63 + ,65 + ,69 + ,65 + ,56 + ,73 + ,65 + ,45 + ,66 + ,71 + ,57 + ,73 + ,60 + ,50 + ,58 + ,81 + ,40 + ,78 + ,67 + ,58 + ,83 + ,66 + ,49 + ,76 + ,62 + ,49 + ,77 + ,63 + ,27 + ,79 + ,73 + ,51 + ,71 + ,55 + ,75 + ,79 + ,59 + ,65 + ,60 + ,64 + ,47 + ,73 + ,63 + ,49 + ,70 + ,64 + ,65 + ,42 + ,73 + ,61 + ,74 + ,54 + ,46 + ,68 + ,76 + ,69 + ,83 + ,74 + ,55 + ,62 + ,63 + ,78 + ,79 + ,73 + ,58 + ,61 + ,67 + ,34 + ,86 + ,68 + ,67 + ,64 + ,66 + ,45 + ,75 + ,62 + ,68 + ,59 + ,71 + ,49 + ,82 + ,63 + ,19 + ,61 + ,75 + ,72 + ,69 + ,77 + ,59 + ,60 + ,62 + ,46 + ,59 + ,74 + ,56 + ,81 + ,67 + ,45 + ,65 + ,56 + ,53 + ,60 + ,60 + ,67 + ,60 + ,58 + ,73 + ,45 + ,65 + ,46 + ,75 + ,49 + ,70 + ,84 + ,61 + ,38 + ,77 + ,66 + ,54 + ,64 + ,64 + ,46 + ,54 + ,65 + ,46 + ,72 + ,46 + ,45 + ,56 + ,65 + ,47 + ,67 + ,81 + ,25 + ,81 + ,72 + ,63 + ,73 + ,65 + ,46 + ,67 + ,74 + ,69 + ,72 + ,59 + ,43 + ,69 + ,69 + ,49 + ,71 + ,58 + ,39 + ,77 + ,71 + ,65 + ,63 + ,79 + ,54 + ,49 + ,68 + ,50 + ,74 + ,66 + ,42 + ,76 + ,62 + ,45 + ,65 + ,69 + ,50 + ,65 + ,63 + ,55 + ,69 + ,62 + ,38 + ,71 + ,61 + ,40 + ,68 + ,65 + ,51 + ,49 + ,64 + ,49 + ,86 + ,56 + ,39 + ,63 + ,56 + ,57 + ,77 + ,48 + ,30 + ,52 + ,74 + ,51 + ,73 + ,69 + ,48 + ,63 + ,62 + ,56 + ,54 + ,73 + ,66 + ,56 + ,64 + ,72 + ,54 + ,57 + ,28 + ,61 + ,57 + ,52 + ,70 + ,60 + ,53 + ,68 + ,61 + ,70 + ,63 + ,72 + ,63 + ,76 + ,57 + ,46 + ,69 + ,51 + ,45 + ,71 + ,63 + ,68 + ,39 + ,54 + ,54 + ,54 + ,72 + ,60 + ,64 + ,62 + ,50 + ,70 + ,68 + ,66 + ,76 + ,62 + ,56 + ,71 + ,63 + ,54 + ,73 + ,77 + ,72 + ,81 + ,57 + ,34 + ,50 + ,57 + ,39 + ,42 + ,61 + ,66 + ,66 + ,65 + ,27 + ,77 + ,63 + ,63 + ,62 + ,66 + ,65 + ,66 + ,68 + ,63 + ,69 + ,72 + ,49 + ,72 + ,68 + ,42 + ,67 + ,59 + ,51 + ,59 + ,56 + ,50 + ,66 + ,62 + ,64 + ,68 + ,72 + ,68 + ,72 + ,68 + ,66 + ,73 + ,67 + ,59 + ,69 + ,54 + ,32 + ,57 + ,69 + ,62 + ,55 + ,61 + ,52 + ,72 + ,55 + ,34 + ,68 + ,75 + ,63 + ,83 + ,55 + ,48 + ,74 + ,49 + ,53 + ,72 + ,54 + ,39 + ,66 + ,66 + ,51 + ,61 + ,73 + ,60 + ,86 + ,63 + ,70 + ,81 + ,61 + ,40 + ,79 + ,74 + ,61 + ,73 + ,81 + ,35 + ,59 + ,62 + ,39 + ,64 + ,64 + ,31 + ,75 + ,62 + ,36 + ,68 + ,85 + ,51 + ,84 + ,74 + ,55 + ,68 + ,51 + ,67 + ,68 + ,66 + ,40 + ,69) + ,dim=c(3 + ,146) + ,dimnames=list(c('Non-verbale' + ,'Anxiety' + ,'Groupsfeeling') + ,1:146)) > y <- array(NA,dim=c(3,146),dimnames=list(c('Non-verbale','Anxiety','Groupsfeeling'),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 = 'pearson' > 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/15kef1292014114.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) > 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] 3 > 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/2r3ul1292014114.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) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = 2.4261, df = 144, p-value = 0.0165 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.03690309 0.34936536 sample estimates: cor 0.1981635 > 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 > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3nuab1292014114.tab") > > try(system("convert tmp/15kef1292014114.ps tmp/15kef1292014114.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.501 0.238 1.114