
In this lecture, I introduce myself and the course, and I give you a brief overview of the topics we will cover.
In this lecture, I will review for you the definition of a function from your early mathematics classes. I will focus exclusively on polynomials.
After this lecture, you will be able to write your own functions in R. I will focus exclusively on functions with just one parameter, and even then I will focus just on polynomials.
After this lecture, you will be able to plot your own functions with ggplot.
After this lecture you will understand what a polynomial is.
After this lecture, you will be able to read in a data set provided by me.
In this lecture, I review how to fit a least-squares line to the points and how to plot the line.
In this lecture, I review how to plot points along the least-squares line. The points have the same x-coordinates as the data points, but their y-coordinates are determined by the least-squares line.
In this lecture, I review how to visualize the residuals associated with the least-squares line. Recall that the residuals are the difference (in absolute value) between the y-coordinates of the data points and the y-coordinates of the corresponding points along the least-squares line.
After this lecture, you will be able to fit a polynomial of degree two to a set of points using the lm method. We will continue to graph the modeling function, to plot points along it, and to draw in the residuals.
After this lecture, you will be able to fit a polynomial of degree three to a set of points using the lm method. We will continue to graph the modeling function, to plot points along it, and to draw in the residuals.
After this lecture, you will be able to fit a smoothing spline to a set of points. You will be able to adjust your spline by indicating various values for degrees of freedom.
In this lecture, I warn about the dangers of over-fitting.
This course is a sequel to my course "R, ggplot, and Simple Linear Regression". Here we take on polynomial regression and learn how to fit polynomials to data sets. Along the way, we will learn how to write our own functions in R and how to graph them with ggplot. At the conclusion of the course, we will learn how to fit a smoothing spline to data sets.
At a relaxed pace, it should take about a week to complete the course. You will need to have R and RStudio installed, and it would be best if you have a background in R and ggplot equivalent to what you would get if you viewed my first course mentioned above.