Page 1 of 1

Replacing NA with values of another variable

Posted: Wed Dec 15, 2010 9:51 am
by Rosa.hh
Hi!
I am using Eviews 7 and I working with a time series database 1990q1-2009q2. How can I replace a variable with the values of two other ones?

I want to creat a variable (grwth_r) which takes the values of max_total when max_total is different than NA
AND takes the values of a_rer_gq when max_total=NA

I know this is a very simple thing, but I am new at eviews and have not managed to get the right program.

I have alredy tried the following approaches but did not succed:

series grwth_r=@recode(a_rer_gq<>NA, a_rer_gq, max_total)

and

' smpl @first @last-(!endobs-!halfobs)
' series grwth_r=a_rer_gq

'smpl @last-(!halfobs-1) @last
'series grwth_r= max_total


I highly appreciate your help!!