Feb 09, 2017
Review of Chapter 3
Played with the advertising data.
d <- read.csv("Advertising.csv") plot(Sales ~ TV, d) m <- lm(Sales ~ TV, d) summary(m) abline(m) matlines(predict(m, newdata=data.frame(TV=0:300), interval="p")) d$x <- log(d$TV) d$y <- log(d$Sales) m <- lm(y ~ x, d) summary(m) plot(y ~ x, d) matlines(log(0:300), predict(m, newdata=data.frame(x=log(0:300)), interval="p")) plot(Sales ~ TV, d) matlines(0:300, exp(predict(m, newdata=data.frame(x=log(0:300)), interval="p")))
Talked about diagnosing model problems.
plot(m)
But also, 4-plots and 6-plots as seen in the NIST handbook.
Next Time
- Thursday, March 9, 2017
Be ready to discuss Chapter 3 of AnIntroductionToStatisticalLearning