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
clearerrs/setmaxerrs
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: clearerrs/setmaxerrs
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
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
Mike
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: clearerrs/setmaxerrs
The interesting thing is that the error message seems to indicate that there is a line somewhere that says:
which doesn't exist anywhere in your code. Perhaps you commented out a large part of the code by mistake?
Code: Select all
setmaxerrs (clearerrs)
Re: clearerrs/setmaxerrs
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
Perhaps you could post the .prg file and the corresponding workfile.
Re: clearerrs/setmaxerrs
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
Who is online
Users browsing this forum: No registered users and 2 guests
