# # 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. # #----- # # EPage 138 # DF = read.csv( "../../Data/HOT.csv", header=TRUE, stringsAsFactors=FALSE ) rownames(DF) = DF$Name DF$Name = NULL # Create our indicator variables: # sea = as.double( DF$Altitude < 100 ) mid = as.double( (DF$Altitude >= 100) & (DF$Altitude < 1000) ) high = as.double( DF$Altitude >= 1000 ) DF$sea = sea DF$mid = mid DF$high = high # Duplicate Table 6.4 in the book: # m1 = lm( MaxJanTemp ~ sea + high, data=DF ) # here the base level is the mid level summary(m1)