I keep getting errors for the If statement, can you see why? thanks a lot.
smpl 1990Q1 @last
for !j=1 to 43
smpl 1990Q1 1999Q4+!j-1
if @last<2008Q4 then equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4
endif
else equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4 dum08Q4
smpl 1999Q4+!j 1999Q4+!j+19
forecast alum_01_!j
series mse01_!jalum = (alum_01_!j - lalum)^2
next
if statement
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: if statement
endif needs to be after the else
Re: if statement
thanks. I corrected it but I still get an error on the if statement.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: if statement
You're missing a then statement
Re: if statement
I even put the equation after else to the next line but I still get an error. Is the "@last<2008Q4" correct?
Here is my if statement,
if @last<2008Q4 then
equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4
else
equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4 dum08Q4
endif
please help, I am stuck and cannot see why!
thanks
Here is my if statement,
if @last<2008Q4 then
equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4
else
equation eqalum01_!j.ls d(lalum) c ma(1) dum2 dum3 dum4 dum08Q4
endif
please help, I am stuck and cannot see why!
thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: if statement
No, @last cannot be used like that.
Re: if statement
any recommendation on what I need to do then?
thanks
thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: if statement
It isn't clear what you're trying to do.
Who is online
Users browsing this forum: No registered users and 2 guests
