Page 1 of 1
comparing ARDL model vs AR model
Posted: Mon Jun 12, 2023 1:38 pm
by houji
Hi,
I have an ARDL model for inflation and output gap using the autolag select based on the BIC, and I want to compare the model against the AR model (no output gap). Is there a quick way to compare these two models in the command line? I can't seem to find how to extract the selected lags.
Ex. if the ARDL model is ARDL(n,1), I want to compare it against the AR(n) model.
Thanks!
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 9:33 am
by EViews Gareth
What does compare mean in this sense? Just estimate the two equations and display them side by side?
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 9:35 am
by houji
Hi Gareth,
Yes, estimate the two equations side by side, and compare forecasting properties (RMSE)
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 9:41 am
by EViews Gareth
Estimate the two equations and have them open next to each other.
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 10:12 am
by houji
Is there a way to do so in the command line? I want to incorporate it into a loop.
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 10:30 am
by EViews Gareth
Code: Select all
equation eq1.ls y c ar(1 to !n)
show eq1
equation eq2.ardl(deplags=!n, reglags=!n) y x
show eq2
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 10:42 am
by houji
Thanks Gareth!
The problem with that code is that the ARDL model selected isnt necessarily the one with the largest lag. For example, the max lag specification I gave was 4, lags, but Eviews picked ARDL(2,0) based on the BIC. Is there a way to recover the "2" from the ARDL(2,0) model selected, and use it as input in my ar equation?
Code: Select all
equation eq1.ardl(deplags=4, reglags=4) y x
show eq1
'use !n as the lag that was autoselected by Eviews
equation eq2.ls y c ar(1 to !n)
show eq2
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 11:19 am
by EViews Gareth
There isn't an easy way. You could freeze the output into a table and parse the table, or use eq1.@varlist to retrieve the list of selected variables and parse that.
Re: comparing ARDL model vs AR model
Posted: Tue Jun 13, 2023 1:46 pm
by houji
Thanks Gareth!
I froze the table, and parsed the lag number using the @mid string function.