check if an estimation was succesfull

For questions regarding programming in the EViews programming language.

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

szabod
Posts: 2
Joined: Thu Apr 25, 2013 7:45 am

check if an estimation was succesfull

Postby szabod » Thu Apr 25, 2013 8:03 am

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

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

Re: check if an estimation was succesfull

Postby EViews Gareth » Thu Apr 25, 2013 8:10 am

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

szabod
Posts: 2
Joined: Thu Apr 25, 2013 7:45 am

Re: check if an estimation was succesfull

Postby szabod » Thu Apr 25, 2013 8:51 am

Thank you very much!

It helped me a lot!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest