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(2 + ,73 + ,69 + ,1 + ,58 + ,53 + ,1 + ,68 + ,43 + ,2 + ,69 + ,60 + ,1 + ,62 + ,49 + ,1 + ,68 + ,62 + ,1 + ,65 + ,45 + ,1 + ,65 + ,50 + ,1 + ,81 + ,75 + ,1 + ,73 + ,82 + ,2 + ,64 + ,60 + ,1 + ,68 + ,59 + ,1 + ,51 + ,21 + ,1 + ,68 + ,40 + ,1 + ,61 + ,62 + ,2 + ,77 + ,54 + ,1 + ,69 + ,47 + ,1 + ,73 + ,59 + ,2 + ,61 + ,37 + ,2 + ,62 + ,43 + ,1 + ,63 + ,48 + ,1 + ,69 + ,59 + ,2 + ,47 + ,79 + ,2 + ,66 + ,62 + ,1 + ,58 + ,16 + ,2 + ,63 + ,38 + ,1 + ,69 + ,58 + ,2 + ,59 + ,60 + ,1 + ,59 + ,72 + ,2 + ,63 + ,67 + ,2 + ,65 + ,55 + ,1 + ,65 + ,47 + ,2 + ,71 + ,59 + ,1 + ,60 + ,49 + ,2 + ,66 + ,47 + ,1 + ,67 + ,57 + ,2 + ,81 + ,39 + ,1 + ,62 + ,49 + ,1 + ,63 + ,26 + ,2 + ,73 + ,53 + ,2 + ,55 + ,75 + ,1 + ,59 + ,65 + ,1 + ,64 + ,49 + ,2 + ,63 + ,48 + ,2 + ,74 + ,45 + ,2 + ,67 + ,31 + ,1 + ,64 + ,67 + ,1 + ,73 + ,61 + ,1 + ,54 + ,49 + ,1 + ,76 + ,69 + ,2 + ,74 + ,54 + ,2 + ,63 + ,80 + ,2 + ,73 + ,57 + ,2 + ,67 + ,34 + ,2 + ,68 + ,69 + ,1 + ,66 + ,44 + ,2 + ,62 + ,70 + ,2 + ,71 + ,51 + ,1 + ,68 + ,66 + ,1 + ,63 + ,18 + ,1 + ,75 + ,74 + ,1 + ,77 + ,59 + ,2 + ,62 + ,48 + ,1 + ,74 + ,55 + ,2 + ,67 + ,44 + ,2 + ,56 + ,56 + ,2 + ,60 + ,65 + ,2 + ,58 + ,77 + ,1 + ,65 + ,46 + ,2 + ,49 + ,70 + ,1 + ,61 + ,39 + ,2 + ,66 + ,55 + ,2 + ,64 + ,44 + ,2 + ,65 + ,45 + ,1 + ,46 + ,45 + ,2 + ,81 + ,25 + ,2 + ,65 + ,49 + ,1 + ,72 + ,65 + ,2 + ,65 + ,45 + ,2 + ,74 + ,71 + ,1 + ,69 + ,48 + ,1 + ,59 + ,41 + ,2 + ,58 + ,40 + ,1 + ,71 + ,64 + ,2 + ,79 + ,56 + ,2 + ,68 + ,52 + ,1 + ,66 + ,41 + ,2 + ,62 + ,45 + ,1 + ,69 + ,49 + ,1 + ,60 + ,42 + ,2 + ,63 + ,54 + ,1 + ,62 + ,40 + ,1 + ,61 + ,40 + ,2 + ,65 + ,51 + ,1 + ,64 + ,48 + ,2 + ,67 + ,80 + ,2 + ,56 + ,38 + ,2 + ,56 + ,57 + ,1 + ,48 + ,28 + ,1 + ,74 + ,51 + ,1 + ,69 + ,46 + ,1 + ,62 + ,58 + ,1 + ,73 + ,67 + ,1 + ,64 + ,72 + ,1 + ,57 + ,26 + ,1 + ,57 + ,54 + ,2 + ,60 + ,53 + ,2 + ,61 + ,69 + ,1 + ,72 + ,64 + ,1 + ,57 + ,47 + ,1 + ,51 + ,43 + ,1 + ,63 + ,66 + ,1 + ,54 + ,54 + ,1 + ,72 + ,62 + ,1 + ,62 + ,52 + ,1 + ,68 + ,64 + ,1 + ,62 + ,55 + ,2 + ,63 + ,57 + ,1 + ,77 + ,74 + ,1 + ,57 + ,32 + ,1 + ,57 + ,38 + ,1 + ,61 + ,66 + ,2 + ,66 + ,37 + ,1 + ,65 + ,26 + ,1 + ,63 + ,64 + ,1 + ,59 + ,28 + ,2 + ,66 + ,66 + ,1 + ,68 + ,65 + ,1 + ,72 + ,48 + ,1 + ,68 + ,44 + ,2 + ,68 + ,64 + ,1 + ,67 + ,39 + ,1 + ,59 + ,50 + ,1 + ,56 + ,52 + ,1 + ,62 + ,66 + ,2 + ,55 + ,48 + ,2 + ,72 + ,70 + ,2 + ,68 + ,66 + ,1 + ,67 + ,61 + ,1 + ,54 + ,31 + ,2 + ,69 + ,61 + ,1 + ,61 + ,54 + ,1 + ,55 + ,34 + ,2 + ,75 + ,62 + ,1 + ,55 + ,47 + ,1 + ,49 + ,52 + ,2 + ,54 + ,37 + ,1 + ,51 + ,46 + ,1 + ,66 + ,50 + ,1 + ,73 + ,61 + ,2 + ,63 + ,70 + ,2 + ,61 + ,38 + ,1 + ,74 + ,63 + ,2 + ,81 + ,34 + ,1 + ,58 + ,46 + ,1 + ,62 + ,40 + ,1 + ,64 + ,30 + ,1 + ,62 + ,35 + ,1 + ,85 + ,51 + ,1 + ,74 + ,56 + ,1 + ,51 + ,68 + ,1 + ,66 + ,39 + ,2 + ,61 + ,44 + ,1 + ,72 + ,58) + ,dim=c(3 + ,164) + ,dimnames=list(c('gender' + ,'nonverbal' + ,'anxiety') + ,1:164)) > y <- array(NA,dim=c(3,164),dimnames=list(c('gender','nonverbal','anxiety'),1:164)) > 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' > par1 <- 'pearson' > #'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/1ixif1292346464.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] 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/2x6f61292346464.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 = 0.9391, df = 162, p-value = 0.3491 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.0805778 0.2243013 sample estimates: cor 0.0735807 > 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/3szh71292346465.tab") > > try(system("convert tmp/1ixif1292346464.ps tmp/1ixif1292346464.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.525 0.228 1.609