Lecture Overview:

What Could go Wrong? (Ch. 3)

Linearity of Regression Function

Linearity Check

Untitled

Toluca Company Example:

library("ALSM")
mydata = TolucaCompany
X = mydata$x
Y = mydata$y

mymodel = lm(Y ~ X)
residuals(mymodel)

plot(X, mymodel$residuals, col = "orange", pch = 16, ylim=c(-120,150))
abline(h = 0)