R, ggplot, and Simple Linear Regression
4.6 (680 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.
9,503 students enrolled
Wishlisted Wishlist

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

Add to Wishlist

R, ggplot, and Simple Linear Regression

Begin to use R and ggplot while learning the basics of linear regression
4.6 (680 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.
9,503 students enrolled
Last updated 5/2015
English
Price: Free
Includes:
  • 2 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
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
View Curriculum
Requirements
  • You will need to install both R and RStudio on your computer. We will, however, cover this in the first lecture.
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.

Who 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.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 25 Lectures Collapse All 25 Lectures 02:13:42
+
Getting Started
5 Lectures 17:29
Introduction
02:19

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

Installing R and RStudio
02:57

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

A Tour of RStudio
02:06

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

Vectors in R
06:32

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

Data Frames
03:35
+
Working with ggplot
6 Lectures 36:06

After this lecture, students will be able to install ggplot2

Installing ggplot2
02:52

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

Plotting a point with ggplot
08:31

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

Controlling axis properties
09:00

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

More with color and shape
04:22

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

Graphing lines with ggplot
05:11

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

More with lines
06:10
+
Sampling from populations
6 Lectures 43:08

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

Normal populations
05:20

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.

Plotting a vertical sample
06:11

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.

Plotting several vertical samples
08:47

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

Samples along a line
08:59

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

sapply
03:47

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

Cloud of points
10:04
+
Simple Linear Regression in R
8 Lectures 36:59

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

Father and son heights
05:42

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

Equation of a line
02:19

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

Residual visualization
12:09

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

Sum of squared residuals
04:57

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

The least squares line
05:07

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

Prediction
03:02

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

Reading in Excel files
02:35

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.

Course wrap-up
01:08
About the Instructor
Charles Redmond
4.6 Average rating
1,429 Reviews
19,419 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.