# # EPage 240 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- save_plots = F library(DAAG) library(lattice) # needed for stripplot if( save_plots ){ postscript("../../WriteUp/Graphics/Chapter7/prob_1_plot.eps", onefile=FALSE, horizontal=FALSE) } stripplot( trt ~ log(weight), pch=0, xlab="log(Weight) log(mg)", data=sugar, aspect=0.5 ) if( save_plots ){ dev.off() } sugar$logWeight = log(sugar$weight) # Perform the analysis needed: levels( sugar$trt ) sugar.aov = aov( logWeight ~ trt, data=sugar ) summary.lm(sugar.aov)