* GFClocks Example Set up a regression model with interaction to predict the price of a grandfather clock from the age of the clock and number of bids; gfclocks <- read.table("c:/datasets/gfclocks.txt", header=T) interact <- gfclocks$age * gfclocks$nbids model <- lm(price ~ age + nbids + interact, data=gfclocks) print(summary(model)) pdf("c:/datasets/gfclocks-plots.pdf") p = predict(model) r = resid(model) plot(p, r, main="GFClocks Example -- Interaction Model", xlab="Predicted Value", ylab="Residual") abline(h=0, lty="dashed", col="red") qqnorm(r, main="GFClocks Example -- Interaction Model") qqline(r, lty="dashed", col="red") dev.off( )