Page 1 of 1

store autoarima in model object

Posted: Thu Jan 26, 2023 2:25 pm
by BT454
Hi all!
I'm creating several automatic arima forecasts in a loop, within a program. I would like to at least save the model stats as tables within my workfile or if possible, store the automatic arima models as equations within my model. Any thoughts on how to do this?
I've included some of my code below:

Code: Select all

model hsddc_daily for %x CEN NED WST US smpl %ss %es pysh{%x}.autoarma(maxsar=1, maxsma=1, noconv, forclen=135, etable) pysh{%x}_0 smpl %ss %es hsddc{%x}.autoarma(maxsar=1, maxsma=1, noconv, forclen=120, etable) hsddc{%x}_0 dom pysh{%x} next for %x cen ned wst us hsddc_daily.append @identity ihsddc{%x} = pysh{%x}_0*hsddc{%x}(-365) next 'solve the model %solvestart = @datestr(@dateadd(@dateval(hsddcned.@last),-14,"d"),"mm/dd/yyyy") %solveend = @datestr(@dateadd(@dateval(hsddcned.@last),120,"d"),"mm/dd/yyyy") smpl %solvestart %solveend hsddc_daily.solveopt(s=d,d=d,m=5000,c=1e-8,a=f,o=g,i=a,n=t,e=t,g=n,z=1e-7,f=t,v=f,j=a) solve hsddc_daily

Re: store autoarima in model object

Posted: Tue Jan 31, 2023 10:25 am
by EViews Gareth
I don't understand exactly what you want to store. Aren't you already using the etable option to store the results table?

Re: store autoarima in model object

Posted: Tue Jan 31, 2023 2:03 pm
by BT454
I am, but the tables are seemingly not being produced. When the loop finishes, there are no tables in the WF. Any thoughts?

Re: store autoarima in model object

Posted: Tue Jan 31, 2023 3:21 pm
by EViews Gareth
Ah, right, you'll need to freeze it.

Code: Select all

freeze(myname) series.autoarma(etable)

Re: store autoarima in model object

Posted: Wed Feb 01, 2023 8:23 am
by BT454
I was able to figure out how to create an equation in the autoarima code, so this is solved.
I did notice that eviews tends to run much slower using the autoarima function. Is this typical?
It's chewing up a fair amount of my cpu/ram (58% and 68%, respectively). Is there a way I could code the equations to still select the best eq, while speeding up the process (similar to declaring a model object, merging the eqs into the model, and solving it does for the auto-var?)
Thanks again!
Bob

Re: store autoarima in model object

Posted: Tue Feb 07, 2023 8:30 am
by BT454
I figured out that using the maxsar and maxsma options was slowing it down, and producing less accurate results. Problem solved!
A follow up question:
I can't seem to get the command to product the forecast comparison graphs in the loop. Code is below. Any help is appreciated.
Thanks!

Code: Select all

for %x CEN NED WST 'US smpl %ss %es statusline estimating %x daily hsd connects equation hsddc{%x}.autoarma(tform = "auto", maxsar=0, maxsma=0, select=mse, msetype="dyn", periods=365, forclen=!fl, eqname=hsddc{%X}_0eq, fgraph) hsddc{%x}_0 @expand(@weekday) @expand(@quarter) hsddc_daily.merge hsddc{%x}_0eq next

Re: store autoarima in model object

Posted: Tue Feb 07, 2023 9:59 am
by EViews Gareth
You need to freeze the output.