Page 1 of 1

Optimal AIC-based max lag ADF test

Posted: Tue Aug 13, 2019 6:17 am
by pka
Hello,

Is there a command to retrieve the optimal max lag order based on a given information criterion when running the ADF test?

I need to carry out the ADF test on a large number of series. Next, for each series, I need to record the optimal lag order automatically suggested by say the AIC.

I tried to loop over the relevant cell content of the ADF table output but I am having a difficulty retrieving the lag order because the cell contains both strings and the need number of lag.

Thanks for your help.

Regards,

PK

Re: Optimal AIC-based max lag ADF test

Posted: Tue Aug 13, 2019 8:12 am
by EViews Gareth
There's an undocumented option (that we really need to document...) to save all the useful stuff from the test.

Code: Select all

myseries.uroot(save=myvector)
will save the useful statistics from the unit root test into the vector myvector. The last element contains the number of selected lags.

Re: Optimal AIC-based max lag ADF test

Posted: Tue Aug 13, 2019 11:47 am
by pka
Many thanks indeed Dear Gareth!

Re: Optimal AIC-based max lag ADF test

Posted: Fri Aug 16, 2019 10:32 am
by pka
Many thanks indeed Dear Gareth!
Hello Gareth,

I see the last element of the vector refers to the maximum lag length used.

Is it possible to retrieve the retained lag order for the test?

Thanks,

PK

Re: Optimal AIC-based max lag ADF test

Posted: Fri Aug 16, 2019 10:48 am
by EViews Gareth
I think that's the 2nd element?

Re: Optimal AIC-based max lag ADF test

Posted: Fri Aug 16, 2019 11:49 am
by pka
I think that's the 2nd element?
Yes indeed. It is the one.
Many thanks.