# # Epage 137 # # 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. # #----- # version$language == "R" for R version$language == NULL for SPlus if(is.null(version$language) == FALSE) require(alr3) else library(alr3) # transactions data if(is.null(version$language) == FALSE) data(transact) if(is.null(version$language) == FALSE) pairs(transact,gap=0.4,cex.labels=1.5,cex=0.5) else pairs(transact) m1 <- lm(Time~ T1 + T2, data=transact) dm <- delta.method(m1,"b1/b2") # compare this to the values obtained by the bootstrap in Chapter 4: # alpha = 0.95 nConf <- qnorm( 1 - (1-alpha)/2 ) print( dm$estimate - nConf * dm$se ) print( dm$estimate + nConf * dm$se )