Iris, Mtcars and Trees Datasets: Linear Regression Analysis

Ausrine
1 August 2018

Intro

Hello, this presentation is part of the final project of the Developing Data Products course as part of the Coursera Data Science specialization. Please enjoy.

The Shiny application discussed in this presentation is located here: https://ninja555.shinyapps.io/Project3/

Application Overview

The Shiny Application shows a linear regression between the various variables found in the 3 datasets analysed.

Follow these 3 steps to generate the linear regression graph:

  1. Select Dataset
  2. Select Variable X
  3. Select Variable Y

Dataset Overview: Iris

Datasets used are: Iris, Mtcars and Trees

library(datasets)
data(iris)
head(iris, 4)
  Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1          5.1         3.5          1.4         0.2  setosa
2          4.9         3.0          1.4         0.2  setosa
3          4.7         3.2          1.3         0.2  setosa
4          4.6         3.1          1.5         0.2  setosa

Dataset Overview: Mtcars

Datasets used are: Iris, Mtcars and Trees

library(datasets)
data(mtcars)
head(mtcars, 4)
                mpg cyl disp  hp drat    wt  qsec vs am gear carb
Mazda RX4      21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
Mazda RX4 Wag  21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
Datsun 710     22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
Hornet 4 Drive 21.4   6  258 110 3.08 3.215 19.44  1  0    3    1

Dataset Overview:Trees

Datasets used are: Iris, Mtcars and Trees

library(datasets)
data(trees)
head(mtcars, 4)
                mpg cyl disp  hp drat    wt  qsec vs am gear carb
Mazda RX4      21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
Mazda RX4 Wag  21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
Datsun 710     22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
Hornet 4 Drive 21.4   6  258 110 3.08 3.215 19.44  1  0    3    1