comparing ARDL model vs AR model

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

houji
Posts: 11
Joined: Mon Mar 20, 2023 3:19 pm

comparing ARDL model vs AR model

Postby houji » Mon Jun 12, 2023 1:38 pm

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: comparing ARDL model vs AR model

Postby EViews Gareth » Tue Jun 13, 2023 9:33 am

What does compare mean in this sense? Just estimate the two equations and display them side by side?
Follow us on Twitter @IHSEViews

houji
Posts: 11
Joined: Mon Mar 20, 2023 3:19 pm

Re: comparing ARDL model vs AR model

Postby houji » Tue Jun 13, 2023 9:35 am

Hi Gareth,

Yes, estimate the two equations side by side, and compare forecasting properties (RMSE)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: comparing ARDL model vs AR model

Postby EViews Gareth » Tue Jun 13, 2023 9:41 am

Estimate the two equations and have them open next to each other.
Follow us on Twitter @IHSEViews

houji
Posts: 11
Joined: Mon Mar 20, 2023 3:19 pm

Re: comparing ARDL model vs AR model

Postby houji » Tue Jun 13, 2023 10:12 am

Is there a way to do so in the command line? I want to incorporate it into a loop.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: comparing ARDL model vs AR model

Postby EViews Gareth » Tue Jun 13, 2023 10:30 am

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
Follow us on Twitter @IHSEViews

houji
Posts: 11
Joined: Mon Mar 20, 2023 3:19 pm

Re: comparing ARDL model vs AR model

Postby houji » Tue Jun 13, 2023 10:42 am

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
Attachments
Untitled.png
Untitled.png (1.65 KiB) Viewed 5315 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: comparing ARDL model vs AR model

Postby EViews Gareth » Tue Jun 13, 2023 11:19 am

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.
Follow us on Twitter @IHSEViews

houji
Posts: 11
Joined: Mon Mar 20, 2023 3:19 pm

Re: comparing ARDL model vs AR model

Postby houji » Tue Jun 13, 2023 1:46 pm

Thanks Gareth!

I froze the table, and parsed the lag number using the @mid string function.


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 17 guests