R: Correlation and regression

PDF Copy of the Correlation and regression notes

We’ve been learning about different aspects of R – how to bring data in, how to clean the data, and how to graph the data.  Providing us with the basics of manipulating our data and visualizing it.  Remember though that R is a system that is used for statistical computation as well as graphics.  What makes is a robust system is that it includes a programming language, graphics, interfaces or connection opportunities with other languages, and debugging capabilities.  Although we can use R for many different purposes we can also use it for our statistical needs.

To start the statistical side of things, today we will see how we can use R to create correlations and regressions with our data.  We will use Fisher’s Iris dataset as the sample data to take us through correlations and regressions.

Download the R Script file used to work through this section of the R program.

Let’s work through the R script file in R Studio.  I will add tricks and tips that I’ve learned in the sample at a later date.  Please note that the R-script file contains comments throughout to guide you through it.


One thought on “R: Correlation and regression”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: