Forecasting using SAS Forecast Server, SAS/ETS, and more

Time Series Forcasting System by command line

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

Time Series Forcasting System by command line

Hello

I would like to use TSFC but by using command lines because it is a repetitic operation to do in the case of my application. So i did that:

dm 'forecast data = work.nb_&datasetn id = d_report interval = month horizon=1 entry=forecast out=forecast';

run;

The problem is that requires "var" but I have dozens series in that file. It seems that I cannot run that for all those series like with window TSFS.

Here is the result that I would like to have, like by using window TSFS: http://image.noelshack.com/fichiers/2015/23/1433509516-forecast.png. It is more validation of previous data than forecast.

Maybe is it an other way to do ? I tried with PROC forecast but it can't fit best model (I think).

Thanks for your help.

Francois


Accepted Solutions
Solution
‎06-08-2015 06:19 AM
SAS Employee
Posts: 17

Re: Time Series Forcasting System by command line

Yes. PROC ESM works with one type of exponential smoothing model and optimizes its parameters. In your case you would then need to create multiple runs of PROC ESM for all variables and store the results in order to compare them and select the best model for each series.

For your current setup, instead of using the FORECAST command you should probably try the %FORECAST macro instead. More information available here: http://support.sas.com/documentation/cdl/en/etsug/67525/HTML/default/etsug_tfcomref_toc.htm

Thanks,

Snurre

View solution in original post


All Replies
SAS Employee
Posts: 17

Re: Time Series Forcasting System by command line

Hi,

I'm not entirely sure what you are using TSFS for but there are a couple of options you could consider:

- Use the SAS Macro facility to build some smart code - for instance a loop around the same command where you only substitute the variable name.

- Use something like PROC ESM which supports variable lists in the FORECAST statement.

Even though the first option is certainly doable, it might be a somewhat daunting task if you are not familiar with the SAS Macro facility already. Unless there are some considerations which your opening post do not mention that should be taken into account, I would recommend the second option.

Thanks,

Snurre

Contributor
Posts: 29

Re: Time Series Forcasting System by command line

Yes, it works.

However, I would like to fit the best model to my different series (wich can be different for each serie) and ESM don't do that (I think, because the standard error of TSFS is always inferior or lower to standard error of ESM).

By using macro, I succes to list all my variables. However, I met a bug by using this by command line.

http://image.noelshack.com/fichiers/2015/24/1433755526-screen.png

http://image.noelshack.com/fichiers/2015/24/1433755526-screen2.png

Already for only one variable, TSFS does not close the window after fitting one serie. So, when it starts to fit the second serie it displays an error message.

So, do you have an idea iether to fix this bug or to fit the best model to my series?

Thanks,

François

Solution
‎06-08-2015 06:19 AM
SAS Employee
Posts: 17

Re: Time Series Forcasting System by command line

Yes. PROC ESM works with one type of exponential smoothing model and optimizes its parameters. In your case you would then need to create multiple runs of PROC ESM for all variables and store the results in order to compare them and select the best model for each series.

For your current setup, instead of using the FORECAST command you should probably try the %FORECAST macro instead. More information available here: http://support.sas.com/documentation/cdl/en/etsug/67525/HTML/default/etsug_tfcomref_toc.htm

Thanks,

Snurre

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1132 views
  • 3 likes
  • 2 in conversation