Polynomial Regression, R, and ggplot

Learn how to write and graph functions in R and how to fit polynomials to data sets.
4.6 (228 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.
5,755 students enrolled
Free
Start Learning Now
  • Lectures 13
  • Length 1 hour
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 5/2015 English

Course 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.

What are the 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".

What am I going to get from this course?

  • Write functions in R.
  • Graph functions with ggplot.
  • Fit polynomials to data sets.
  • Fit smoothing splines to data sets.

What 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.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Functions in R
01:43

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

02:30

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

03:54

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.

07:53

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

02:17

After this lecture you will understand what a polynomial is.

Section 2: Polynomial Regression
02:46

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

05:49

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

03:33

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.

06:54

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.

07:24

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.

05:56

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.

10:52

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.

03:31

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

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Charles Redmond, 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.

Ready to start learning?
Start Learning Now