I would expect the @recode function to be the answer, but if I run this sample program:
Code: Select all
series x = 2
x(1) = 0
series y = 1
series z = @recode(x=0,na,y/x)The only ways round it that I have found are either to run the program with the maximum errors option set to some suitable value >1, which risks masking other errors, or to write an if statement using the @elem function to test each value of x in turn, which is potentially slow and inelegant.
Is there a better solution? I'm using EViews 7.
Thanks
Geoff
