Page 1 of 1

check if an estimation was succesfull

Posted: Thu Apr 25, 2013 8:03 am
by szabod
Hi!

I would like to know, how can i check if an estimation was succesfull?

For example, look at the following sample code:

equation eq01
eq01.arch(4,5,tdist,integrated) series_of_returns


The above gives me an error (log of non positive number), so I want to handle this in an if statement:

if (eq01.arch(4,5) series_of_returns)) then
statusline "OK"
endif


This gives me a syntax error, so how can i handle properly if an estimate was failure?

Thanks

Re: check if an estimation was succesfull

Posted: Thu Apr 25, 2013 8:10 am
by EViews Gareth
You can use combinations of these commands (all listed in the Command Reference):

Code: Select all

setmaxerrs @errorcount @lasterrnum @lasterrstr
A simple example would be:

Code: Select all

setmaxerrs 2 eq01.arch(4,5) series_of_returns if @errorcount = 0 then statusline "OK" endif

Re: check if an estimation was succesfull

Posted: Thu Apr 25, 2013 8:51 am
by szabod
Thank you very much!

It helped me a lot!