10-14-2013 09:31 AM
I'm trying to forecast the sales volume of 2 size(SizeA and SizeB) of one product using a three-year sales history. I have about 20 variables(including week, price, competitors price/volume, promotion dummy, holiday/season dummy) and 100 weeks data. My data set is like this(holiday and season are dummy variables like Thks, Spring, Fall, etc.):
I used stepwise/forward/backward to select some variables first and got about 10 variables for SizeA. And I was told to use proc mixed, proc panel, proc forecast to build the model. But I cannot understand how to code even after looking up the examples. And most examples has different sections but I don't think I have. Can somebody help me with the coding?
10-17-2013 02:29 PM
Hi Akilees -
My suggestion would be to start with a univariate model and try to add complexity like input variables later.
Please have a look at PROC ESM as a start - you will need to make sure that you data is in time series format in order to use that (or any other time series forecasting) procedure.
Check out: http://support.sas.com/documentation/cdl/en/etsug/66100/HTML/default/viewer.htm#etsug_esm_gettingsta... as a starting point - you will find lots of information about time series data here: http://support.sas.com/documentation/cdl/en/etsug/66100/HTML/default/viewer.htm#etsug_tsdata_toc.htm
The way I see it you will need to do something like:
PROC ESM ...;
id week_ending interval=week;
forecast sizeAvol SizeBvol;
Note that this code will run a simple ESM by default, so you may want to look at the model option of the FORECAST statement for more advanced models.
For more complex models, such as ARIMAX or UCM, which allow you to take independent variables into account please refer to either PROC ARIMA or PROC UCM.
All of these procedures are features in SAS/ETS software.
10-20-2013 12:14 PM
Thank you Udo!
I later realized my data is not panel data, I'm supposed to find the most important factors and get an equation to estimate the sales. But I really learned a lesson from the procedure you told me.