# # EPage 241 # # 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(MASS) cuckoos.rlm_a = rlm( length ~ breadth, data=cuckoos ) # one model cuckoos.rlm_b = rlm( length ~ breadth + species, data=cuckoos ) # different intercepts and the same slope cuckoos.rlm_c = rlm( length ~ breadth + species + breadth:species, data=cuckoos ) # different intercepts and different slopes anova( cuckoos.rlm_a, cuckoos.rlm_b, cuckoos.rlm_c ) # look for outliers: if( save_plots ){ postscript("../../WriteUp/Graphics/Chapter7/prob_6_plot.eps", onefile=FALSE, horizontal=FALSE) } plot( cuckoos.rlm_b, which=1 ) if( save_plots ){ dev.off() } # look at the coefficients: summary( cuckoos.rlm_b )