Estimate time series forecasting models for multiple groups at once using the autoregressive moving average (ARIMA) method or the exponential smoothing (ETS) method.
This tool has a bug in newer versions.I adjusted the script in R at line 337.
and at line 626
THANK YOU for finding this. I was wondering why this macro suddenly stopped working when I updated to 2022.3 version of the Designer and R tools. Doing as you described above changing those two lines fixed the issue.
For those getting a "WriteYXDBStreaming" error try doing this.
THANK YOU VERY MUCH! It works again. I just want to add a few step for a basic user like me.
1. Right click on the TS Model Factory tool.
2. Open Macro
3. On R tool, update two lines posted above.
Sorry I am not very experienced with scripts. Can you provide an example of what to change?
Hi @jam1 1. right click on the TS Model Factory tool and open the macro
2. update the script in R tool in the following lines. (I copied the whole code and paste into a text editor. Replace the value in line 337 and 626
3. Save. Go back to your workflow, the macro will be updated automatically.
Thank you. It's still throwing an error so just verify:
Line 337 currently has: fit_stat <- print(summary(this_model))
I am replacing that text with: fit_stat <- accuracy(this_model)
Line 626 currently has: fit.stat <- print(summary(the.model))
@james_doohan This is what I have on my script and it works. Mine does not have print(). The last screenshot below was the error before I changed the script.
I am trying to do a time series forecast, and my ARIMA model is running the forecast from 2007 to 2100. my data spans from 2007 to 2023. I don't know what I am doing wrong
A few things I would check in case of an unexpected result that have helped me:
1. Make sure your incoming data's frequency matches your forecast frequency (i.e. for yearly forecast you want to roll your incoming data up to annual level before passing it through the forecasting macro, etc.). Additionally, make sure incoming data is sorted in chronological order. You may want to also use a TS Filler tool to fill in missing periods in your data with zeroes before passing data through this macro.
2. Check the macro's settings to ensure all are correct. Time period type should match your data's frequency. Series starting point is a good idea to use; just make sure you have correct setting or will get a wrong result. This TS Model Factory's macro's object output (O) should be linked to the TS Forecast Factory's "M" input anchor. In TS Forecast Factory make sure desired number of future forecast periods is correct.
3. If you are still getting an unexpected result after trying above two points, put a Filter tool after the TS Forecast Factory's output to filter out the undesired periods. In the back-end this macro's models are trained on historical data; you may get some training data included in your forecast unless you filter. I recommend writing the filter to be any period greater than where your current data ends if you are not interested in seeing training periods for the model. That will ensure only forecasts are displayed in the output. The training periods are useful when checking accuracy of the model itself.
I hope that helps!
Thank you so much for your help. I retired after quite a few hours on this, and I believe the solution lies within the really good suggestions I have got on here. I will definitely feedback the results of this exercise. Thanks