Page 1 of 1

How to ignore MLE error report in a loop (grid search)

Posted: Mon Jan 09, 2012 8:41 pm
by ming-ming
Hi All,

Thank you for reading this message.

I am doing full-information maximum likelihood estimation in EViews. In order to obtain some confidence that the estimated log likelihood is "global" max, instead of local max, I am trying to do grid search over the parameter space by changing the initial values of the parameters. However, during this process, some initial values for the parameters may not be good enough and EViews will report error message (for example log of nonpositive number, divided by zero etc.) and stop executing the loop. In that case I need to restart the loop manually by skipping the "bad" initial value and jump to next initial value in the loop. This is very time-consuming.

I am wondering that if EViews could ignore this kind of error message and skip the "bad" initial values automatically and execute the remaining loop?
Other than grid search, what is the alternative way to get "global" max for MLE?

Thank you very much!!

Mingming

How to ignore MLE error report in a loop (grid search)

Posted: Tue Jan 10, 2012 8:05 am
by EViews Gareth
You can use the setmaxerrs command to tell EViews not to stop after a single error. You can also use @errorcount to check whether an error has occurred.

Re: How to ignore MLE error report in a loop (grid search)

Posted: Tue Jan 10, 2012 11:21 am
by ming-ming
You can use the setmaxerrs command to tell EViews not to stop after a single error. You can also use @errorcount to check whether an error has occurred.
Thank you for your suggestion!

But I could not find any further explanation about the command setmaxerrs in all EViews user's guide or reference manual. Could you illustrate how to use it? Any requirement on EViews version? Thanks.

Mingming

Re: How to ignore MLE error report in a loop (grid search)

Posted: Tue Jan 10, 2012 11:34 am
by EViews Gareth
It is only available in EViews 7. It is documented in the Command and Programming Reference.

All versions of EViews let you set the number of errors each time you run a program though (in the Run dialog).

Re: How to ignore MLE error report in a loop (grid search)

Posted: Tue Jan 10, 2012 12:24 pm
by ming-ming
It is only available in EViews 7. It is documented in the Command and Programming Reference.

All versions of EViews let you set the number of errors each time you run a program though (in the Run dialog).
Got it. Thanks!