Unformatted text preview: #Fit the regression line lm.ch1pr19 <- lm(y ~ x) #Find the coefficients lm.ch1pr19$coef #or summary(lm.ch1pr19) #Add a regression line to the previous plot abline(lm.ch1pr19,col="blue") #Get the prediction when x=30 predict(lm.ch1pr19,newdata=data.frame(x=30)) #compute this quantity by typing in the numbers to make sure you #understand what you are doing...
View Full Document
This note was uploaded on 06/16/2009 for the course STAT 540 taught by Professor Staff during the Spring '08 term at Colorado State.
- Spring '08
- Linear Regression