Description: I examine the characteristics of monthly time series data on national retail sales (in the US). I then split the time series into training and testing subsets and evaluate four forecasting models: naive, Holt-Winters exponential smoothing, ARIMA, and dynamic regression using the Consumer Price Index as an exogenous regressor.
The information in the README.md file below contains instructions and helpful information for replicating all analyses. For a detailed step-by-step report that walks through the analytical process, please visit my website.
You will need the following software and R packages installed to run code files and reproduce analyses.
Necessary software: R
Necessary R
packages: forecast
, tseries
, astsa
, ggplot2
, RColorBrewer
, Quandl
sales-forecasts.R : .R file that contains all data import, cleaning, and analyses
/graphs/ : PNG files of all graphical output produced by sales-forecasts.R file
To begin, download sales-forecasts.R into a folder. When using R
, set this folder as the working directory using setwd
.
R
script files are executable once a working directory to the folder containing data files is set. Running these scripts will reproduce all data cleaning procedures, plots, and analyses.
US Census Bureau
Quandl's Federal Reserve Economic Data
OECD
Hyndman and Athanasopoulos' "Forecasting:Principles and Practice: For an exceptionally detailed discussion of all things forecasting.
Hyndman's Forecasting Course on DataCamp: For further forecasting discussions and code for using the forecast
package.
See LICENSE.md for licensing details for this project.