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:
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.
Is there any seasonal pattern in the plot?
This is difficult to tell simply from the time series plot.
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.
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?
Use the TIMESERIES procedure with the PLOT=SERIES option to plot the time series plot.
proc timeseries data=SALES plots=series;
The plot shows a slight upward trend and seasonal spikes near days 20, 40 and 60. It looks like there is an increase in demand near the month end. Unequal variance exists, but it is simply due to the seasonal pattern in the data.
|cookielawinfo-checkbox-analytics||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".|
|cookielawinfo-checkbox-functional||11 months||The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".|
|cookielawinfo-checkbox-necessary||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".|
|cookielawinfo-checkbox-others||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.|
|cookielawinfo-checkbox-performance||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".|