Polynomial Regression, R, and ggplot
4.6 (312 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
7,952 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Polynomial Regression, R, and ggplot to your Wishlist.

Add to Wishlist

Polynomial Regression, R, and ggplot

Learn how to write and graph functions in R and how to fit polynomials to data sets.
4.6 (312 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
7,952 students enrolled
Created by Charles Redmond
Last updated 5/2015
English
Price: Free
Includes:
  • 1 hour on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Write functions in R.
  • Graph functions with ggplot.
  • Fit polynomials to data sets.
  • Fit smoothing splines to data sets.
View Curriculum
Requirements
  • Students will need to have R and RStudio installed on their own computers.
  • It will be best if students have the background one would get by viewing my course "R, ggplot, and Simple Linear Regression".
Description

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.

Who is the target audience?
  • This course is for those looking to learn more about R.
  • This course is for those looking to learn more about ggplot.
  • This course is for those looking to understand polynomial regression.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
13 Lectures
01:05:02
+
Functions in R
5 Lectures 18:17

In this lecture, I introduce myself and the course, and I give you a brief overview of the topics we will cover.

Introduction
01:43

In this lecture, I will review for you the definition of a function from your early mathematics classes. I will focus exclusively on polynomials.

A Review of Functions
02:30

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.

Creating Functions in R
03:54

After this lecture, you will be able to plot your own functions with ggplot.

Plotting Functions with ggplot
07:53

After this lecture you will understand what a polynomial is.

Polynomials
02:17
+
Polynomial Regression
8 Lectures 46:45

After this lecture, you will be able to read in a data set provided by me.

Reading in Our Data
02:46

In this lecture, I review how to fit a least-squares line to the points and how to plot the line.

Fitting a Line
05:49

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.

Plotting Points along the Least-Squares Line
03:33

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.

Visualizing the Residuals
06:54

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.

Best Fitting Polynomial of Degree 2
07:24

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.

Best Fitting Polynomial of Degree 3
05:56

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.

Smoothing Splines
10:52

In this lecture, I warn about the dangers of over-fitting.

Course wrap-up
03:31
About the Instructor
Charles Redmond
4.5 Average rating
1,702 Reviews
22,148 Students
7 Courses
Professor at Mercyhurst University

Dr. Charles Redmond is a professor in the Tom Ridge School of Intelligence Studies and Information Science at Mercyhurst University. He has been a member of the Department of Mathematics and Computer Systems at Mercyhurst for 21 years and has recently completed a term as chair of the department. Dr. Redmond received his PhD in mathematics from Lehigh University in 1993 and has published in the Annals of Applied Probability, the Journal of Stochastic Processes and Their Applications, Mathematics Magazine, the College Mathematics Journal, and Mathematics Teacher. In his spare time he enjoys making music and computer generated art, reading, and owning a Clumber Spaniel.