clearerrs/setmaxerrs

For questions regarding programming in the EViews programming language.

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

mike_d
Posts: 17
Joined: Thu Feb 09, 2012 7:52 am

clearerrs/setmaxerrs

Postby mike_d » Mon May 07, 2012 12:57 pm

I have a code I wrote and successfully used a few weeks ago that estimates VAR/VEC for 246 datasets depending on whether the variables are cointegrated or not. I use setmaxerrs and clearerrs in multiple parts of the code to deal with errors I know can occur. Like I said everything worked fine a few weeks ago, now I am trying to rerun everything to finalize the results however I am getting errors saying that 'setmaxerrs (clearerrs) is not defined or an illegal command.' I will post a snippet of code, any suggestions would be greatly appreciated.



''****************************************** '''johansen cointegration test ************************************************
''coint
setmaxerrs 50

!old_count = @errorcount
!new_count = 0
scalar counter = 0
group g1 s3

for !j = 9 to 14 step 2
!old_count = @errorcount
g1.add s!j
freeze(coint_test!j) g1.coint(s,4)


!new_count = @errorcount
if !new_count > !old_count then
!old_count = @errorcount
freeze(coint_test!j) g1.coint(s,2)

endif

!new_count = @errorcount
if !new_count > !old_count then
!old_count = @errorcount
freeze(coint_test!j) g1.coint(s,1)
endif

!new_count = @errorcount
if !new_count > !old_count then
table(16,8) coint_test!j
endif
g1.drop s!j
next !j
clearerrs

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

Re: clearerrs/setmaxerrs

Postby EViews Gareth » Mon May 07, 2012 1:05 pm

I ran that code (on a test workfile) and it appeared to work ok. Are you using the same version of EViews?

mike_d
Posts: 17
Joined: Thu Feb 09, 2012 7:52 am

Re: clearerrs/setmaxerrs

Postby mike_d » Mon May 07, 2012 1:08 pm

I am using eviews 7, the same version as before. I use it through an online server (citrix), they make updates occasionally but I am not sure if this would cause the problem.

Mike

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

Re: clearerrs/setmaxerrs

Postby EViews Gareth » Mon May 07, 2012 1:13 pm

The interesting thing is that the error message seems to indicate that there is a line somewhere that says:

Code: Select all

setmaxerrs (clearerrs)
which doesn't exist anywhere in your code. Perhaps you commented out a large part of the code by mistake?

mike_d
Posts: 17
Joined: Thu Feb 09, 2012 7:52 am

Re: clearerrs/setmaxerrs

Postby mike_d » Mon May 07, 2012 1:16 pm

I do not think I have changed anything since I last ran the code. I can set maxerrors manually after clicking run which allows it to loop through a couple files, I get errors on each line using those two statements.

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

Re: clearerrs/setmaxerrs

Postby EViews Gareth » Mon May 07, 2012 1:20 pm

Perhaps you could post the .prg file and the corresponding workfile.

mike_d
Posts: 17
Joined: Thu Feb 09, 2012 7:52 am

Re: clearerrs/setmaxerrs

Postby mike_d » Mon May 07, 2012 1:27 pm

I can post the .prg file, however I create a new workfile from datasets given in excel format each time. I have 246 excel files about 300kb each, altogether 68mbs. Is there a way to upload a folder of that size?
Attachments
test_all_exogs_fixed.prg
(27.77 KiB) Downloaded 631 times


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests