Page 1 of 1

Run LM test in the loop

Posted: Tue Oct 02, 2012 10:31 am
by Amber
Dear Eviews Expert,

I am trying to run the LM serial correlation test with lag 6 across 200 series, and collect the p-value for them.

I have created the loop, but I don't know how to collect the LM p-val in Eviews code (my guess is something like "lm.@series"), is it possible to do this in Eviews?

If it is possible, will you please tell me how to do it?

I really appreciate your kind help!

Best regards,

Amber

Re: Run LM test in the loop

Posted: Tue Oct 02, 2012 10:32 am
by EViews Gareth

Re: Run LM test in the loop

Posted: Tue Oct 02, 2012 10:35 am
by Amber
Absolutely brilliant! Cheers!

Re: Run LM test in the loop

Posted: Tue Oct 02, 2012 10:47 am
by Amber
Dear Gareth,

I have tried:

Code: Select all

freeze(tab1) eq1.lm lag=6 scalar chi_pvalue = @val(tab1(4,4))
But it is not working, can you correct the code for me?

Thanks!

Re: Run LM test in the loop

Posted: Tue Oct 02, 2012 10:52 am
by EViews Gareth
According to the Object Reference, the correct command for performing the auto correlation LM test is equation.auto(lags)

Re: Run LM test in the loop

Posted: Tue Oct 02, 2012 10:58 am
by Amber
Thanks, it works like charm!

I will post the code here:

Code: Select all

freeze(tab1) eq1.auto(6) scalar chi_pvalue = @val(tab1(4,5))
Just in case, might be helpful to others.