R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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. > y <- c(4.6,4,4.8,4,5,5,4,4,4.4,4,4,5,3.8,4.6,4,4.6,4.666666667,4,4,4.4,4.8,5.8,4.6,4.75,5,2.75,4,3.8,4.4,4.8,4.25,4.4,4,4.5,5,3.5,2,4.4,4.4,4.25,3.25,4.2,4.75,4.4,4,4.2,5,4.6,4.4,4,4.4,4.5,5.2,4.4,3.25,4.6,3.75,5,3.8,4,5.4,5,5,4.2,4.4,4,4.6,4.2,5.2,6.4,4,4,5,4,4.2,4,4,4,4,4,4.2,4,4,4,5.2,4.2,4.8,4,4.8,5,4.6,4,4.4,4,3.8,4.5) > x <- c(4.4,4.2,5.2,5.2,4.4,5.5,4,4,4,3.8,4,5.25,3.6,4.4,4,4.4,4.333333333,4.6,4,4.4,5,5.2,5.2,4.6,4.6,2.333333333,4,3.8,4,4.6,4.75,4.4,4,4,5.2,3.8,2.5,3.2,4.2,4,3.25,4.2,4.75,4.4,4,4.2,4,4.2,4.4,4,4.6,4.4,4,4.8,2.25,4.8,3.75,5.6,4.2,4.2,5,5.8,5,4,4.4,4.4,4.4,4.4,5.8,6,4,4,5,4,4.2,4.4,4,4,4,4.2,4.6,4.4,4.4,4,5,4.2,5,4,4.8,4,4.6,4,4.4,4,3.4,5.8) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = 'two.sided' > par1 = 'spearman' > ylab = 'specappliedmean' > xlab = 'compappliedmean' > postscript(file="/var/wessaorg/rcomp/tmp/1ntkf1320160648.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,y, xlab=xlab, ylab=ylab) > abline(coef=(lm(y ~ x))$coeff, col='red') > ctp<-cor.test(x, y, use='pair', method='pearson') > legend('bottomright', c('cor =', as.character(round(ctp$estimate, digits=4)))) > dev.off() null device 1 > (sw1<-shapiro.test(x)) Shapiro-Wilk normality test data: x W = 0.9259, p-value = 4.195e-05 > (sw2<-shapiro.test(y)) Shapiro-Wilk normality test data: y W = 0.9226, p-value = 2.799e-05 > (cxy<-cor.test(x, y, method=par1)) Spearman's rank correlation rho data: x and y S = 39473.31, p-value < 2.2e-16 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.7322754 Warning message: In cor.test.default(x, y, method = par1) : Cannot compute exact p-values with ties > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Shapiro Test (', xlab,')',sep=''),3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Statistic W',header=TRUE) > a<-table.element(a,'Probability',header=TRUE) > a<-table.element(a,'Link',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,round(sw1$statistic, digits=4)) > a<-table.element(a,round(sw1$p.value, digits=4)) > a<-table.element(a,hyperlink('http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test','Shapiro-Wilk Test','Shapiro-Wilk Test')) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2bl1s1320160648.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, paste('Shapiro Test (', ylab,')',sep=''),3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Statistic W',header=TRUE) > a<-table.element(a,'probability',header=TRUE) > a<-table.element(a,'Link',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,round(sw2$statistic, digits=4)) > a<-table.element(a,round(sw2$p.value, digits=4)) > a<-table.element(a,hyperlink('http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test','Shapiro-Wilk Test','Shapiro-Wilk Test')) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3f66b1320160648.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlation Test X-Y',5,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Statistic',header=TRUE) > a<-table.element(a,'Value',header=TRUE) > a<-table.element(a,'probability',header=TRUE) > a<-table.element(a,'Method',header=TRUE) > a<-table.element(a,'alternative',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,names(cxy$estimate)) > a<-table.element(a,round(cxy$estimate, digits=4)) > a<-table.element(a,round(cxy$p.value, digits=4)) > a<-table.element(a,cxy$method) > a<-table.element(a,cxy$alternative) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/4meia1320160648.tab") > > try(system("convert tmp/1ntkf1320160648.ps tmp/1ntkf1320160648.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.508 0.079 0.585