Goals of this lesson:
1) Create scatterplots:
plot()
2) Generate linear regression result:
lm()
3) Draw a least-squares regression equation on your scatterplot:
abline()
Instructions
- Watch the following video:
- For the details on the “pch” argument, see the link:
http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r
- Practice #4.5 on p97 (from the Check Your Skills Section in your book). Use the data in the question to generate:
-
-
- a scatterplot with a least-square regression line
-
-
Here are the results:
-END-