\begin{Schunk}
\begin{Sinput}
 plot(tann ~ elevationP100, data = dat, xlab = "Elevation (100s feet)", ylab="Annual Temperature Average")
 abline(mod1)
 newdf <- data.frame(elevationP100 = plotSeq(dat$elevationP100, 20))
 pconf <- predict(mod1, interval="confidence", newdata=newdf)
 lines(newdf$elevationP100, pconf[ ,"lwr"], lwd = 1.5, lty=2, col="red")
 lines(newdf$elevationP100, pconf[ ,"upr"], lwd = 1.5, lty=2, col="red")
 ppred <- predict(mod1, interval="prediction", newdata=newdf)
 lines(newdf$elevationP100, ppred[ ,"lwr"], lwd = 1.5, lty=4, col="green")
 lines(newdf$elevationP100, ppred[ ,"upr"], lwd = 1.5, lty=4, col="green")
 legend("topright", legend=c("predicted","conf. int.","pred. int."), lty=c(1,2,4), col=c("black", "red","green"), lwd = c(1, 1.5, 1.5))
\end{Sinput}
\end{Schunk}
