Code: Select all
series check = @isna(forex)
if check=1 then
series m = 1
endif
So basically, for some reason eviews thinks the condition is never true when in fact it is true in many periods.
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Code: Select all
series check = @isna(forex)
if check=1 then
series m = 1
endif
The if statement doesn't work that way in EViews, which can be confusing. TryI am having a problem with a ridiculously routine task. I am trying to execute an if statement of the following type
I don't actually want to create a series 'm' that equals 1, but have shown that for simplicity. When I run this code, eviews does not create the series 'm' at all. The variable 'check' is a dummy so it always equals either 0 or 1. However. within the if statement, eviews doesn't seem to be reading the 1s in the series. If I add another line of code 'else series m = 0' it does create a series m but it always equals 0.Code: Select all
series check = @isna(forex) if check=1 then series m = 1 endif
So basically, for some reason eviews thinks the condition is never true when in fact it is true in many periods.
Code: Select all
series m = @recode(check,1,0)Code: Select all
forex = @recode(forex=na, forex(-1),forex)
Users browsing this forum: No registered users and 2 guests