Page 1 of 1

Possible @recode option

Posted: Tue May 09, 2017 6:54 am
by neilmorrow
I am using the @recode command in the following way:
smpl 1997 2019
x=@recode(x=na,y/y(+1)*x(+1),x)

However, I would like to use the @recode command so that it begins with 2019, not 1997, given that I would like to replace "x=na" with a term that is calculated using values from the next year. Is this possible? Is there a better command to use than @recode?

Thanks!

Re: Possible @recode option

Posted: Tue May 09, 2017 7:30 am
by EViews Gareth
All series generation commands can be told to run backwards using the genr(r) command:

Code: Select all

genr(r) x=@recode(x=na,y/y(+1)*x(+1),x)