Page 1 of 1

Error Handling

Posted: Sun Jan 31, 2021 6:43 pm
by tim_r
Hi

I am doing a grid search using a for loop. In each iteration I estimate an equation. For some iterations the estimation does not work. How can I tell EViews to exit the loop when the error occurs, rather than the program stopping?

I am using EViews 12.

Thanks
Tim

Re: Error Handling

Posted: Sun Jan 31, 2021 10:51 pm
by EViews Gareth
Look up setmaxerrs and @errorcount

Re: Error Handling

Posted: Mon Feb 01, 2021 2:45 am
by tim_r
Hi Gareth

Thanks. I would prefer to get the program to exit the loop, as if estimation fails once it must fail for all of the subsequent iterations, and they don't need to be tried as would happen with those commands. Is that possible?

tim

Re: Error Handling

Posted: Mon Feb 01, 2021 7:16 am
by EViews Gareth
Exitloop is the command to exit a loop