Davis <- read.table('http://math.uttyler.edu/nathan/classes/statistics/data/davis.data',header=TRUE) attach(Davis) plot(repwt,weight) identify(repwt,weight) Davis[12,] detach(Davis) Prostate <- read.table('http://math.uttyler.edu/nathan/classes/statistics/data/prostate.data',header=TRUE) attach(Prostate) mod <- lm(lpsa ~ lcavol + lweight + age + lbph + svi + lcp + gleason + pgg45) summary(mod) confint(mod) confint(mod,level=.9) confint(mod,level=.93) nDavis <- Davis[-12,] attach(nDavis) plot(repwt,weight) plot(repwt,weight,main='Going to get me in trouble?') plot(repwt,weight,main='Going to get me in trouble?',type='n') points(repwt[sex=='M'],weight[sex=='M'],col='blue') points(repwt[sex=='F'],weight[sex=='F'],col='pink') m1 <- lm(weight ~ repwt + sex) summary(m1) m2 <- lm(weight ~ repwt + sex + repwt*sex) summary(m2)