Page 1 of 1

clearerrs/setmaxerrs

Posted: Mon May 07, 2012 12:57 pm
by mike_d
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

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:05 pm
by EViews Gareth
I ran that code (on a test workfile) and it appeared to work ok. Are you using the same version of EViews?

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:08 pm
by mike_d
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

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:13 pm
by EViews Gareth
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?

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:16 pm
by mike_d
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.

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:20 pm
by EViews Gareth
Perhaps you could post the .prg file and the corresponding workfile.

Re: clearerrs/setmaxerrs

Posted: Mon May 07, 2012 1:27 pm
by mike_d
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?