# RPD -- Examples 1.1+ -- Soybean Yield vs. Ozone Level yld.oz <- data.frame(ozone = c(0.02, 0.07, 0.11, 0.15), yield = c(242, 237, 231, 201)) # create a "data frame" object containing the data set print(yld.oz) yld.oz.model <- lm(yield ~ ozone, data=yld.oz) summary(yld.oz.model) # estimates, etc. anova(yld.oz.model) # analysis of variance predict(yld.oz.model) # predicted values residuals(yld.oz.model) # residuals plot(yield ~ ozone, pch="x", xlim=c(0,0.16), ylim=c(190,260), data=yld.oz) # plot the points ... abline(yld.oz.model) # and the fitted line