R, ggplot, and Simple Linear Regression

Begin to use R and ggplot while learning the basics of linear regression
4.5 (454 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.
6,903 students enrolled
Free
Start Learning Now
  • Lectures 25
  • Contents Video: 2 hours
  • 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

Data science skills are in much demand today, but it is not just the mathematicians, statisticians, and the computer scientists who can benefit from acquiring them. Data science skills are for everyone!

In this course, I help you to begin using R, one of the most important tools in data science, and the excellent graphics package for R, ggplot2. Along the way, I also show you the basics of simple linear regression.

There are no prerequisites. We begin with installation of R and RStudio, and I introduce R and ggplot skills as they are needed as we progress toward an understanding of linear regression.

Students should be able to complete the course within two weeks, working at an easy pace.

Linear regression is a machine learning technique. I hope to create more courses like this one in the future, teaching machine learning, R, ggplot, dplyr, and programming, all at the same time.

What are the requirements?

  • You will need to install both R and RStudio on your computer. We will, however, cover this in the first lecture.

What am I going to get from this course?

  • Install R and RStudio
  • Create vectors and data frames in R
  • Plot points and lines with ggplot
  • Access vectors from data frames
  • Group with ggplot
  • Plot residual lines with ggplot
  • Fit a least squares line to a data set
  • Use a least squares line for prediction

What is the target audience?

  • This course is for beginners interested in using R.
  • This course is for beginners interested in learning about the graphics package ggplot2.
  • This course is for beginners interested in learning some basics of linear regression.
  • This course is NOT for those with a background in statistics who use R and are familiar with ggplot2.

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: Getting Started
Introduction
02:19
02:57

After this lecture, you should be able to install both R and RStudio on your own computer and start a session in RStudio.

02:06

After this lecture, you will know the functions of the four panels in RStudio.

06:32

After this lecture, you will be able to enter vectors into R, access individual coordinates of vectors, and slice vectors.

03:35

After this lecture, you will be able to create a data frame out of several vectors and individually access column vectors of data frames.

Section 2: Working with ggplot
02:52

After this lecture, students will be able to install ggplot2

08:31

After this lecture, you will be able to plot a point using ggplot.

09:00

After this lecture, you will be able to set limits and number of ticks on your axes.

04:22

After this lecture, you will have more colors and shapes to choose from when defining your points.

05:11

After this lecture, you will be able to graph lines with ggplot.

06:10

After this video, you will be able to graph lines with ggplot using the equation of a line.

Section 3: Sampling from populations
05:20

After this lecture, you will be able to generate samples from normal populations in R.

06:11

After this lecture, you will be able to plot a vertical stack of points, with the y-coordinates drawn from a normal population, along with a point which represents the mean of that population.

08:47

After this lecture, you will be able to plot several vertical stacks of points, with the y-coordinates drawn from normal populations, along with points which represent the means of these populations.

08:59

After this lecture, you will be able to plot vertical samples with means lying on a line.

03:47

After this lecture, you will be able to employ the sapply function in R.

10:04

After this lecture, you will be able to generate a cloud of random points based on a true regression line.

Section 4: Simple Linear Regression in R
05:42

At the end of this lecture, you will be able to load and plot the father/son height data from the R package UsingR.

02:19

At the end of this lecture, you will be able to find the equation of a line given two points on the line.

12:09

After this lecture, you will understand residuals, and you will be able to group with ggplot.

04:57

After this lecture, given any line and set of points, you will be able to find the sum of squared residuals.

05:07

After this lecture, you will be able to find the equation of the least squares line in R.

03:02

After this lecture, you will be able to use the least squares line for prediction.

02:35

After this lecture, you will be able to read in data you have stored in an Excel file.

01:08

This is a review of what we've covered in the course, and I also mention some important concepts that we have not covered, some that I hope to address in future courses.

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