Time Series Modeling ​[1-15]

h

Accurate sales prediction has many benefits.

Businesses can manage the inventory better by reducing the loss due to unsold inventory.

When predicting a substantially higher sales volume, more seasonal staff can be recruited to ensure sufficient labor to handle the sales.​

In the SALES data set, we have the sales record of a retail store over a period of 60 days.

If you haven't created the SALES data set, copy and run the code from the yellow box below:

​When performing sales forecasting, it is very important to first understand the movement of the data.

For example, if sales have gone up steadily in the first 60 days, you will expect the sales to keep going up at the same rate for at least a short period after the 60-day mark.

If the sales have a periodic cycle where sales are higher at the end of each month, your forecast has to incorporate this factor into the model as well.

Let's first plot the total sales over a period of 60 days.

proc timeseries data=sales plots=series;
var TotalSales;
run;

​The TIMESERIES procedure is a useful tool to plot data involved with time series analysis.

In our example, we tell SAS to plot the TOTALSALES in a time series plot:

This plots the total sales over a period of 60 days:

Now, what do you look for in a time series plot?

Time series analysis is about using the past data to predict the future.

You usually want to look for the following in the data:

  • Trend
  • Seasonality
  • Unequal Variance

Trend

Are the sales trending up or down?

From the plot, it does not look like there is any upward or downward trend for the sales.

Note: at this stage, we are not performing any statistical testing. We are simply trying to get familiar with the data. 

Seasonality

Is there any seasonal pattern in the plot?

This is difficult to tell simply from the time series plot. 

Unequal Variance

Do the sales become more or less volatile with time?

Again, this is difficult to tell. However, the plot does not show obvious changes in the sales variance.


Let's wrap up our summary before further exploring the data.

From the time series plot, we know that the total sales does not show any apparent trend over the 60-day period. We aren't sure about any seasonal pattern or unequal variance yet.

In the next section, we will explore the seasonality of the sales data.


Exercise

Plot the time series for all type A orders (i.e. ORDERTYPEA column).

​Does the plot show any trend, seasonal pattern and unequal variance?

Need some help?

Get Hint

Get Solution