Page 1 of 1

@recode not working properly

Posted: Fri Nov 22, 2019 3:13 am
by mamo
Dear Eviewers,
I use Eviews 11 build Sept 2019
@recode does not work properly in assignments, see code below which breaks due to log of non-negative number
(Same @recode command as in context of "show" works, however)

Code: Select all

wfcreate a 2000 2010 series x=nrnd show @recode(x<=0,NA,log(x)) 'this works series y=@recode(x<=0,NA,log(x)) 'this doesn't, but it should work as well as the line above

Re: @recode not working properly

Posted: Fri Nov 22, 2019 3:50 am
by mamo
I have found a work-around

Code: Select all

wfcreate a 2000 2010 series x=nrnd ' show @recode(x<=0,NA,log(x)) 'this works series y=0 'pre-define y series y=@recode(x<=0,y,log(x)) 'this works as well!!
Best, mamo

Re: @recode not working properly

Posted: Fri Nov 22, 2019 8:19 am
by EViews Gareth
Not really a bug - EViews is supposed to error/warn when you create a series that generates NAs. The series is still created.