Homework2 STAT 425 - setwd/Users/Bcollender/STAT 425...

This preview shows page 1 out of 1 page.

setwd("/Users/Bcollender/STAT 425") getwd() library(faraway) help(sat) model1 = lm(total~expend+salary+ratio+takers, data = sat) par(mfrow = c(2,2)) plot(model1, add.smooth=FALSE) which.max(model1$residuals) which.min(model1$residuals) model1$residuals[34] model1$residuals[48] which.max(hatvalues(model1)) cooks.distance(model1) help(eco) model2 = lm(home~usborn+income+pop, data = eco) par(mfrow = c(2,2)) plot(model2, add.smooth = FALSE) which.max(model2$residuals) which.min(model2$residuals) model2$residuals[12] model2$residuals[29] which.max(hatvalues(model2))

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture