I am trying to do a loop that combines numeric scalars and strings - basically I want to associate month numbers with month names (ie 1 = jan, 2 = feb, etc.). I tried using the following two methods (one with one loop, one with two separate loops), but these crash Eviews. Is there a way to do this successfully?
Thank you in advance.
METHOD 1
for !mtnum %mtnam 1 jan 2 feb 3 mar
smpl if mt = {!mtnum} AND (yr = 2008 OR yr = 2009)
ism_nsa_adj = {%mtnam}
next
METHOD 2
for !mtnum 1 2 3
for %mtnam jan feb mar
smpl if mt = {!mtnum} AND (yr = 2008 OR yr = 2009)
ism_nsa_adj = {%mtnam}
next
next
loop with string and scalar combined
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: loop with string and scalar combined
If they really crash EViews, you should probably update your copy. That may not fix the problem, but EViews shouldn't be crashing.
Who is online
Users browsing this forum: No registered users and 2 guests
