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
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
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
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
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.