R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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. > x <- array(list(1 + ,36 + ,88 + ,3 + ,56 + ,94 + ,3 + ,48 + ,90 + ,3 + ,32 + ,73 + ,1 + ,44 + ,68 + ,2 + ,39 + ,80 + ,3 + ,34 + ,86 + ,3 + ,41 + ,86 + ,2 + ,50 + ,91 + ,1 + ,39 + ,79 + ,1 + ,62 + ,96 + ,3 + ,52 + ,92 + ,3 + ,37 + ,72 + ,3 + ,50 + ,96 + ,1 + ,41 + ,70 + ,3 + ,55 + ,86 + ,3 + ,41 + ,87 + ,3 + ,56 + ,88 + ,2 + ,39 + ,79 + ,2 + ,52 + ,90 + ,1 + ,46 + ,95 + ,1 + ,44 + ,85 + ,3 + ,41 + ,90 + ,1 + ,50 + ,115 + ,1 + ,50 + ,84 + ,3 + ,44 + ,79 + ,1 + ,52 + ,94 + ,2 + ,54 + ,97 + ,3 + ,44 + ,86 + ,2 + ,52 + ,111 + ,2 + ,37 + ,87 + ,3 + ,52 + ,98 + ,1 + ,50 + ,87 + ,3 + ,36 + ,68 + ,3 + ,50 + ,88 + ,1 + ,52 + ,82 + ,2 + ,55 + ,111 + ,1 + ,31 + ,75 + ,1 + ,36 + ,94 + ,2 + ,49 + ,95 + ,1 + ,42 + ,80 + ,1 + ,37 + ,95 + ,3 + ,41 + ,68 + ,2 + ,30 + ,94 + ,2 + ,52 + ,88 + ,1 + ,30 + ,84 + ,1 + ,44 + ,101 + ,1 + ,66 + ,98 + ,2 + ,48 + ,78 + ,3 + ,43 + ,109 + ,3 + ,57 + ,102 + ,3 + ,46 + ,81 + ,3 + ,54 + ,97 + ,2 + ,48 + ,75 + ,2 + ,48 + ,97 + ,3 + ,62 + ,101 + ,3 + ,58 + ,101 + ,2 + ,58 + ,95 + ,2 + ,62 + ,95 + ,3 + ,46 + ,95 + ,2 + ,34 + ,90 + ,3 + ,66 + ,107 + ,3 + ,52 + ,92 + ,2 + ,55 + ,86 + ,2 + ,55 + ,70 + ,3 + ,57 + ,95 + ,3 + ,56 + ,96 + ,2 + ,55 + ,91 + ,1 + ,56 + ,87 + ,2 + ,54 + ,92 + ,2 + ,55 + ,97 + ,2 + ,46 + ,102 + ,2 + ,52 + ,91 + ,3 + ,32 + ,68 + ,2 + ,44 + ,88 + ,3 + ,46 + ,97 + ,1 + ,59 + ,90 + ,3 + ,46 + ,101 + ,3 + ,46 + ,94 + ,1 + ,54 + ,101 + ,1 + ,66 + ,109 + ,2 + ,56 + ,100 + ,1 + ,59 + ,103 + ,3 + ,57 + ,94 + ,1 + ,52 + ,97 + ,3 + ,48 + ,85 + ,2 + ,44 + ,75 + ,3 + ,41 + ,77 + ,1 + ,50 + ,87 + ,1 + ,48 + ,78 + ,2 + ,48 + ,108 + ,3 + ,59 + ,97 + ,3 + ,46 + ,106 + ,1 + ,54 + ,107 + ,2 + ,55 + ,95 + ,2 + ,54 + ,107 + ,3 + ,59 + ,115 + ,3 + ,44 + ,101 + ,1 + ,54 + ,85 + ,3 + ,52 + ,90 + ,3 + ,66 + ,115 + ,3 + ,44 + ,95 + ,2 + ,57 + ,97 + ,3 + ,39 + ,112 + ,3 + ,60 + ,97 + ,3 + ,45 + ,77 + ,3 + ,41 + ,90 + ,1 + ,50 + ,94 + ,3 + ,39 + ,103 + ,1 + ,43 + ,77 + ,3 + ,48 + ,98 + ,3 + ,37 + ,90 + ,3 + ,58 + ,111 + ,2 + ,46 + ,77 + ,3 + ,43 + ,88 + ,2 + ,44 + ,75 + ,3 + ,34 + ,92 + ,2 + ,30 + ,78 + ,2 + ,50 + ,106 + ,2 + ,39 + ,80 + ,3 + ,37 + ,87 + ,3 + ,55 + ,92 + ,3 + ,39 + ,86 + ,3 + ,36 + ,85 + ,2 + ,43 + ,90 + ,1 + ,50 + ,101 + ,3 + ,55 + ,94 + ,3 + ,43 + ,86 + ,3 + ,60 + ,86 + ,2 + ,48 + ,90 + ,1 + ,30 + ,75 + ,3 + ,43 + ,86 + ,3 + ,39 + ,91 + ,3 + ,52 + ,97 + ,2 + ,39 + ,91 + ,3 + ,39 + ,70 + ,2 + ,56 + ,98 + ,3 + ,59 + ,96 + ,3 + ,46 + ,95 + ,2 + ,57 + ,100 + ,3 + ,50 + ,95 + ,3 + ,54 + ,97 + ,3 + ,50 + ,97 + ,3 + ,60 + ,92 + ,1 + ,59 + ,115 + ,3 + ,41 + ,88 + ,2 + ,48 + ,87 + ,3 + ,59 + ,100 + ,3 + ,60 + ,98 + ,1 + ,56 + ,102 + ,3 + ,51 + ,96) + ,dim=c(3 + ,151) + ,dimnames=list(c('MOMAGE' + ,'MC30VRB' + ,'WISCRY7V') + ,1:151)) > y <- array(NA,dim=c(3,151),dimnames=list(c('MOMAGE','MC30VRB','WISCRY7V'),1:151)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'FALSE' > par2 = '3' > par1 = '1' > ylab = 'Y Variable Name' > xlab = 'X Variable Name' > main = 'Title Goes Here' > par3 <- 'FALSE' > par2 <- '3' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: aston2 > #To cite this work: Ian E. Holliday, 2012, One-Way-Between-Groups ANOVA (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_One%20Factor%20ANOVA.wasp/ > #Source of accompanying publication: > # > cat1 <- as.numeric(par1) # > cat2<- as.numeric(par2) # > intercept<-as.logical(par3) > x <- t(x) > x1<-as.numeric(x[,cat1]) > f1<-as.character(x[,cat2]) > xdf<-data.frame(x1,f1) > (V1<-dimnames(y)[[1]][cat1]) [1] "MOMAGE" > (V2<-dimnames(y)[[1]][cat2]) [1] "WISCRY7V" > names(xdf)<-c('Response', 'Treatment') > if(intercept == FALSE) (lmxdf<-lm(Response ~ Treatment - 1, data = xdf) ) else (lmxdf<-lm(Response ~ Treatment, data = xdf) ) Call: lm(formula = Response ~ Treatment - 1, data = xdf) Coefficients: Treatment100 Treatment101 Treatment102 Treatment103 Treatment106 2.333 2.143 2.000 2.000 2.500 Treatment107 Treatment108 Treatment109 Treatment111 Treatment112 2.000 2.000 2.000 2.333 3.000 Treatment115 Treatment68 Treatment70 Treatment72 Treatment73 2.000 2.500 2.000 3.000 3.000 Treatment75 Treatment77 Treatment78 Treatment79 Treatment80 1.600 2.250 1.667 2.000 1.667 Treatment81 Treatment82 Treatment84 Treatment85 Treatment86 3.000 1.000 1.000 2.000 2.889 Treatment87 Treatment88 Treatment90 Treatment91 Treatment92 1.857 2.429 2.400 2.200 2.833 Treatment94 Treatment95 Treatment96 Treatment97 Treatment98 2.125 2.273 2.600 2.500 2.400 > (aov.xdf<-aov(lmxdf) ) Call: aov(formula = lmxdf) Terms: Treatment Residuals Sum of Squares 792.0757 76.9243 Deg. of Freedom 35 116 Residual standard error: 0.8143343 Estimated effects are balanced > (anova.xdf<-anova(lmxdf) ) Analysis of Variance Table Response: Response Df Sum Sq Mean Sq F value Pr(>F) Treatment 35 792.08 22.6307 34.127 < 2.2e-16 *** Residuals 116 76.92 0.6631 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > #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,'ANOVA Model', length(lmxdf$coefficients)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, paste(V1, ' ~ ', V2), length(lmxdf$coefficients)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'means',,TRUE) > for(i in 1:length(lmxdf$coefficients)){ + a<-table.element(a, round(lmxdf$coefficients[i], digits=3),,FALSE) + } > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1to8v1351876917.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'ANOVA Statistics', 5+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, ' ',,TRUE) > a<-table.element(a, 'Df',,FALSE) > a<-table.element(a, 'Sum Sq',,FALSE) > a<-table.element(a, 'Mean Sq',,FALSE) > a<-table.element(a, 'F value',,FALSE) > a<-table.element(a, 'Pr(>F)',,FALSE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, V2,,TRUE) > a<-table.element(a, anova.xdf$Df[1],,FALSE) > a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'F value'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], digits=3),,FALSE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residuals',,TRUE) > a<-table.element(a, anova.xdf$Df[2],,FALSE) > a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Mean Sq'[2], digits=3),,FALSE) > a<-table.element(a, ' ',,FALSE) > a<-table.element(a, ' ',,FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2r8hg1351876917.tab") > postscript(file="/var/wessaorg/rcomp/tmp/353oq1351876917.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(Response ~ Treatment, data=xdf, xlab=V2, ylab=V1) > dev.off() null device 1 > if(intercept==TRUE){ + 'Tukey Plot' + thsd<-TukeyHSD(aov.xdf) + postscript(file="/var/wessaorg/rcomp/tmp/461l01351876917.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(thsd) + dev.off() + } > if(intercept==TRUE){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Tukey Honest Significant Difference Comparisons', 5,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a, ' ', 1, TRUE) + for(i in 1:4){ + a<-table.element(a,colnames(thsd[[1]])[i], 1, TRUE) + } + a<-table.row.end(a) + for(i in 1:length(rownames(thsd[[1]]))){ + a<-table.row.start(a) + a<-table.element(a,rownames(thsd[[1]])[i], 1, TRUE) + for(j in 1:4){ + a<-table.element(a,round(thsd[[1]][i,j], digits=3), 1, FALSE) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/51g9l1351876917.tab") + } > if(intercept==FALSE){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'TukeyHSD Message', 1,TRUE) + a<-table.row.end(a) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Must Include Intercept to use Tukey Test ', 1, FALSE) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/6b6ha1351876917.tab") + } > library(car) Loading required package: MASS Loading required package: nnet > lt.lmxdf<-leveneTest(lmxdf) > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Levenes Test for Homogeneity of Variance', 4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ', 1, TRUE) > for (i in 1:3){ + a<-table.element(a,names(lt.lmxdf)[i], 1, FALSE) + } > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Group', 1, TRUE) > for (i in 1:3){ + a<-table.element(a,round(lt.lmxdf[[i]][1], digits=3), 1, FALSE) + } > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ', 1, TRUE) > a<-table.element(a,lt.lmxdf[[1]][2], 1, FALSE) > a<-table.element(a,' ', 1, FALSE) > a<-table.element(a,' ', 1, FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/7x7dl1351876917.tab") > > try(system("convert tmp/353oq1351876917.ps tmp/353oq1351876917.png",intern=TRUE)) character(0) > try(system("convert tmp/461l01351876917.ps tmp/461l01351876917.png",intern=TRUE)) convert: unable to open image `tmp/461l01351876917.ps': @ error/blob.c/OpenBlob/2587. convert: missing an image filename `tmp/461l01351876917.png' @ error/convert.c/ConvertImageCommand/3011. character(0) attr(,"status") [1] 1 Warning message: running command 'convert tmp/461l01351876917.ps tmp/461l01351876917.png' had status 1 > > > proc.time() user system elapsed 1.123 0.186 1.287