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

For questions regarding programming in the EViews programming language.

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

ming-ming
Posts: 9
Joined: Mon Jan 09, 2012 8:22 pm

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

Postby ming-ming » Mon Jan 09, 2012 8:41 pm

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
Last edited by ming-ming on Tue Jan 10, 2012 12:25 pm, edited 1 time in total.

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

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

Postby EViews Gareth » Tue Jan 10, 2012 8:05 am

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.

ming-ming
Posts: 9
Joined: Mon Jan 09, 2012 8:22 pm

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

Postby ming-ming » Tue Jan 10, 2012 11:21 am

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

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

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

Postby EViews Gareth » Tue Jan 10, 2012 11:34 am

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).

ming-ming
Posts: 9
Joined: Mon Jan 09, 2012 8:22 pm

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

Postby ming-ming » Tue Jan 10, 2012 12:24 pm

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!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests