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(182,161,161,177,157,170,167,186,178,171,175,166,161,168,163,166,187,168,197,175,180,170,175,173,171,166,169,166,157,183,166,178,173,164,169,176,166,174,178,187,164,178,163,183,179,160,174,162,182,165,169,185,176,183,172,173,165,177,180,173,189,162,165,164,158,178,175,173,165,163,166,160,160,182,183,165,168,169,167,170,182,178,165,163,162,173,161,184,180,189,165,185,169,159,164,178,163,163,175,164,152,167,166,166,183,179,174,179,167,168,184,184,169,178,178,167,178,165,157,171,157,166,185,160,148,177,162,172,188,191,175,163,165,176,171,160,165,157,173,184,168,162,150,163,169,172,167,163,161,162,172,163,159,170,166,191,158,169,170,168,178,170,178,174,176,165,173,162,172,169,183,158,185,173,164,156,164,175,180,181,177) > x <- c(77,58,53,68,59,76,76,69,71,65,70,57,51,64,52,65,92,62,76,61,119,61,65,66,54,50,63,58,39,101,71,75,79,52,68,64,56,69,88,65,54,80,63,78,85,54,54,75,82,56,74,102,65,73,75,57,68,71,71,78,97,60,64,64,52,80,62,66,55,56,50,50,63,69,69,61,55,53,60,56,59,62,53,57,57,70,56,84,69,88,56,103,50,52,55,63,47,45,62,53,52,57,64,59,84,79,55,67,76,62,83,96,75,65,78,69,68,55,45,68,44,62,87,56,50,83,53,64,90,85,66,52,53,54,64,55,55,59,70,88,57,47,47,48,54,69,57,51,54,53,59,56,59,63,66,96,53,76,61,62,71,66,81,68,80,63,70,56,60,58,76,50,88,89,59,51,62,74,83,90,79) > par2 = 'two.sided' > par1 = 'kendall' > ylab = 'specmemmean' > xlab = 'compmemomean' > par2 <- 'two.sided' > par1 <- 'kendall' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Ian E. Holliday, 2012, Pregnancy and Cognition (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_Pregnancy%20and%20cognition.wasp/ > #Source of accompanying publication: > # > postscript(file="/var/wessaorg/rcomp/tmp/104at1337512265.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.9442, p-value = 1.636e-06 > (sw2<-shapiro.test(y)) Shapiro-Wilk normality test data: y W = 0.9846, p-value = 0.04433 > (cxy<-cor.test(x, y, method=par1)) Kendall's rank correlation tau data: x and y z = 11.9845, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6156473 > > #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/23hrz1337512265.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/3lfnh1337512265.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/4vgpv1337512265.tab") > > try(system("convert tmp/104at1337512265.ps tmp/104at1337512265.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.591 0.143 0.728