1 A Case Study on the Price of Gasoline

1.1 Do you believe the ARIMA model can do the magic?

1.1.1 YES!

Give me your reasons.

1.1.2 NO!

Why?

1.2 Import the data

Gas_prices <- readxl::read_xlsx(path = "data/Gas_prices_1.xlsx")
colnames(Gas_prices)

[1] “Date” “Year” “Month” “Unleaded”
[5] “Crude_price” “SP500” “PDI” “CPI”
[9] “RR_sales” “Unemp” “Housing” “Demand”
[13] “Production” “Imports” “Stocks” “Time”
[17] “L1_Unleaded” “L1_Crude_price” “L1_SP500” “L1_PDI”
[21] “L1_CPI” “L1_RR_sales” “L1_Unemp” “L1_Housing”
[25] “L1_Demand” “L1_Production” “L1_Imports” “L1_Stocks”
[29] “Recession”

if (!require("forecast")){install.packages("forecast")}

1.3 Scatter plot between Unleaded and predictors

library("PerformanceAnalytics")
my_data1 <- Gas_prices[,-c(1:3,10:29)]
chart.Correlation(R = my_data1, histogram=TRUE, pch=19)

my_data2 <- Gas_prices[,-c(1:3,5:9, 16:29)]
chart.Correlation(R = my_data2, histogram=TRUE, pch=19)

my_data3 <- Gas_prices[,-c(1:3,5:16,23:29)]
chart.Correlation(R = my_data3, histogram=TRUE, pch=19)