# # 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. # # Computations used for the problems in this section of the text. # #----- source('utils.R') # Ex 10.6 # DF = read.csv( "../../Data/CH10/ex10-06.txt", header=TRUE, quote="'" ) res = ANOVA( DF$FE, DF$Formation ) # Ex 10.7 # I = 4 J = 5 MSE = 14713.69 SSE = MSE * I * (J-1) SSTr = 310500.76 - SSE MSTr = SSTr / ( I-1 ) f = MSTr / MSE p_value = 1 - pf( f, I-1, I*(J-1) ) # Ex 10.8 # DF = read.csv( "../../Data/CH10/ex10-08.txt", header=TRUE, quote="'" ) res = ANOVA( DF$stiffness, DF$lengths ) # Ex 10.9 # DF = read.csv( "../../Data/CH10/ex10-09.txt", header=TRUE, quote="'" ) res = ANOVA( DF$Thiamine, DF$Type )