04-04-2012 09:20 AM
Hi, does anyone know if there is a way I can extrapolate to an END date in ARIMA rather than say next 12 months.. the reason for this request is that the 6000 models I need to do, have end dates that are all over the place. Some end in Jun'11 some July'11, etc.. If I end them all Dec'12, that I can use in my developmental forecasting modeling. I'm aware of SAS' forecast server, but unfortunately not in the plans right now... Thanks
04-06-2012 10:57 AM
PROC ARIMA does not feature an END statement like PROC TIMESERIES does.
It seems to me that the challenge you are running into is one of the reason why SAS Forecast Server was designed - just saying
Provided that I understand your challenge correctly, the bigger issue will be to come up with the 6000 ARIMA models, unless you would like to reuse the same model specification over and over again.
Back to your challenge: one way to overcome the "different end dates" challenge is to a) figure out the individual end dates of the series and then b) to adjust the LEAD option of the FORECAST statement in ARIMA appropriately.
To illustrate what I'm talking about have a look at this very simplified example:
set sashelp.air(where=(date le "01MAR60"d)) sashelp.air(in=right);
if right then type=2;else type=1;
*assumption is that end date for series is different and that shorter series contain no missing values but at the end;
proc timeseries data=air out=_null_ outsum=outsum(keep=type nmiss);
id date interval=month end="01DEC1960"d;
%do i=1 %to 2;
proc arima data=air(where=(type=&i)) plots(only)=forecast(forecast);
estimate q=(1)(12) noint method=ml;
forecast id=date interval=month out=arima&i lead=&lead;
set arima1(where=(air=.)) arima2(where=(air=.) in=right);
if right then type=2;else type=1;
keep date forecast l95 u95 type;
proc print data=results noobs;run;
Hope this makes sense,
04-06-2012 11:58 AM
Thanks Udo, I am all for the SAS Forecast Server.. I might have to do some groupings and then reuse the model specifications over again.. But the question I have, since Price is the dependent variable, would that be treated independently by each 6000 models.. So use the Store (6000) as a BY Groupings.
Also the harder question is, how does ARIMA do variable selection, I beleive ARIMAX might??
04-06-2012 12:50 PM
Yes, if you would like to include independent variables or discrete events to your models it would be either PROC ARIMA (e.g. ARIMAX) or PROC UCM.
Both procedures do not provide automatic variable selection as for example SAS Forecast Server does (sorry for sneaking it in again ).
Unfortunately there is no easy answer to your challenge I can provide you with and you will need to do a lot of macro coding I believe to tackle the following issues:
a) data quality problems (different start and end dates of your 6000 series for example)
b) come up with the concept of a "model repository" which allows you to specify different model formulations - which includes whether or not to include independent variables.
c) allow for BY group processing
d) select an appropriate model using ideas like hold-out samples per BY group
e) allow for the incorporation of a hierarchy concept.
f) other considerations - like running all of this in batch and updating model parameters when new data arrives.
I guess I'm confirming your suspicion that automating forecasting with SAS/ETS procedures for many series can be challenging.
Don't worry I won't mention the more appropriate approach again :smileygrin: