Page 1 of 1

Feeding ARIMA parameters to a subroutine

Posted: Tue Jan 22, 2013 12:47 pm
by BrettT
Hi. I am writing a subroutine which involves estimating an ARIMA model, say mysubroutine. I would like it to be able to provide the ARIMA parameters when I call the subroutine, say mysubroutine(y,x,a,b,c). This routine would will take series x, parameters a, b and c as inputs and estimate ls d(x,a) c ar(1) ... ar(b) ma(1) ... ma(c), before eventually generating an output series y.

How should I write the codes for the ARIMA part in the subroutine? Thanks a lot.

Re: Feeding ARIMA parameters to a subroutine

Posted: Tue Jan 22, 2013 12:52 pm
by EViews Gareth
This program builds up an ARIMA string:
http://forums.eviews.com/viewtopic.php?f=15&t=1175

Re: Feeding ARIMA parameters to a subroutine

Posted: Tue Jan 22, 2013 1:51 pm
by BrettT
Thank you very much. I modified the codes and am now able to write my subroutine.

Re: Feeding ARIMA parameters to a subroutine

Posted: Tue Jan 22, 2013 4:15 pm
by EViews Gareth
I should point out that in EViews 8 you can simply do:

Code: Select all

ar(1 to {b}) ma(1 to {c})

Re: Feeding ARIMA parameters to a subroutine

Posted: Wed Jan 23, 2013 5:05 am
by BrettT
Thanks, it looks like I should ask my school to update the Eviews we have. BTW, when I embed the modified ARIMA codes into the subroutine and use the the subroutine in a loop, Eviews crushed in a few seconds. Then I reduce the amount of string variables (those "%*" variables) used in the ARIMA codes, it solves the problem, but running the loop is quite slow.
I should point out that in EViews 8 you can simply do:

Code: Select all

ar(1 to {b}) ma(1 to {c})