Selecting lag length that eliminates autocorrelation in ECM

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

mrduran
Posts: 6
Joined: Wed Aug 03, 2011 6:11 am
Contact:

Selecting lag length that eliminates autocorrelation in ECM

Postby mrduran » Wed Aug 03, 2011 6:34 am

Hi, I am currently trying to implement Pesaran-Shin-Smith coinegration procedure for 12 different couples of series (swap and bond yield series of 12 different tenors).

PSS procedure is based on estimating an Unrestricted Error Correction Model of the form;

d(Y) d(X) Y(-1) X(-1) d(Y(-1)) d(X(-1)) d(Y(-2)) d(X(-2)) ... d(Y(-p)) d(X(-p))

Also you can add an intercept or a trend to this model.

In order to get healthy results, I need to determine the lag length which eliminates the autocorrelation of the disturbances and yields the minimum information criterion value (for example Schwarz Criterion).

I need to write a code that at least automatically runs p+1 (max. lag length) different least squares regressions (putting no lags, and then 1 lag of both variables, then 2, then 3...) and writes Schwarz values, Breusch-Godfrey LM stats for different orders of autocorrelation (for instance 1st, 5th and 20th order) to a table or a matrix. Then I can run the code for all 12 series and repeat these steps for the model with intercept.

I need help, Thank you in advance.

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

Re: Selecting lag length that eliminates autocorrelation in

Postby EViews Gareth » Wed Aug 03, 2011 7:45 am


mrduran
Posts: 6
Joined: Wed Aug 03, 2011 6:11 am
Contact:

Re: Selecting lag length that eliminates autocorrelation in

Postby mrduran » Wed Aug 03, 2011 2:10 pm

Thank you Gareth, that introduction page is awesome. It is more helpful than a 500-page eviews programming book :)
I think, your 6th and 7th entries fully clear up my trouble :D


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests