0% found this document useful (0 votes)
61 views

EDA and Regression: Introduction To Assignment

The document summarizes exploratory data analysis and linear regression performed on economic data from an Excel file. It includes: 1) An overview of the data structure and variables such as crude oil prices, interest rates, foreign trade, and economic indicators. 2) Summary statistics showing the distribution of each variable. 3) Checking for missing data and finding none. 4) Fitting a linear regression model to predict the Dow Jones Industrial Average using the other variables.

Uploaded by

ShuBham Kanswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

EDA and Regression: Introduction To Assignment

The document summarizes exploratory data analysis and linear regression performed on economic data from an Excel file. It includes: 1) An overview of the data structure and variables such as crude oil prices, interest rates, foreign trade, and economic indicators. 2) Summary statistics showing the distribution of each variable. 3) Checking for missing data and finding none. 4) Fitting a linear regression model to predict the Dow Jones Industrial Average using the other variables.

Uploaded by

ShuBham Kanswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EDA and Regression

SHUBHAM

18/08/2020

Introduction to Assignment
The assignment require us to import data from excel file and carry out (EDA) Exploratory
Data Analytics and also run the basic regression model on it.
library(readxl)
Regression_Assignment <- read_excel("regression assignment.xlsx")
reg <- Regression_Assignment

The data file contain the following information


Structure of Data
## tibble [12 x 7] (S3: tbl_df/tbl/data.frame)
## $ CRUDE : num [1:12] 10.9 12 12.5 17.7 28.1 ...
## $ INTEREST: num [1:12] 7.61 7.42 8.41 9.44 11.46 ...
## $ FOREIGN : num [1:12] 31 35 42 54 83 109 125 137 165 185 ...
## $ DJIA : num [1:12] 975 895 820 844 891 ...
## $ GNP : num [1:12] 1718 1918 2164 2418 2732 ...
## $ PURCHASE: num [1:12] 1.76 1.65 1.53 1.38 1.22 ...
## $ CONSUMER: num [1:12] 234 264 308 348 349 ...

Summary Of data
## CRUDE INTEREST FOREIGN DJIA
## Min. :10.90 Min. : 7.420 Min. : 31.0 Min. : 820.2
## 1st Qu.:14.07 1st Qu.: 8.205 1st Qu.: 51.0 1st Qu.: 889.6
## Median :22.35 Median :10.030 Median :117.0 Median : 953.9
## Mean :22.12 Mean :10.123 Mean :118.2 Mean :1167.4
## 3rd Qu.:28.70 3rd Qu.:11.705 3rd Qu.:170.0 3rd Qu.:1224.8
## Max. :35.60 Max. :13.910 Max. :244.0 Max. :2276.0
## GNP PURCHASE CONSUMER
## Min. :1718 Min. :0.8800 Min. :234.4
## 1st Qu.:2354 1st Qu.:0.9527 1st Qu.:337.7
## Median :3110 Median :1.0665 Median :373.9
## Mean :3094 Mean :1.1957 Mean :426.4
## 3rd Qu.:3833 3rd Qu.:1.4180 3rd Qu.:532.0
## Max. :4527 Max. :1.7570 Max. :685.5

Finding the missing values


## CRUDE INTEREST FOREIGN DJIA GNP PURCHASE CONSUMER
## [1,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [2,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [3,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [4,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [5,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [6,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [7,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [8,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [9,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [10,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [11,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [12,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE

Linear Regression Modal


##
## Call:
## lm(formula = reg$DJIA ~ ., data = reg)
##
## Coefficients:
## (Intercept) CRUDE INTEREST FOREIGN GNP
PURCHASE
## 927.4178 6.0855 -82.3673 11.5185 -0.2575
465.7685
## CONSUMER
## -0.4294

You might also like