Page 1 of 1

Selecting lag length that eliminates autocorrelation in ECM

Posted: Wed Aug 03, 2011 6:34 am
by mrduran
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.

Re: Selecting lag length that eliminates autocorrelation in

Posted: Wed Aug 03, 2011 7:45 am
by EViews Gareth

Re: Selecting lag length that eliminates autocorrelation in

Posted: Wed Aug 03, 2011 2:10 pm
by mrduran
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