Page 1 of 1

Assign special values for some observations in a series

Posted: Mon Sep 21, 2015 1:27 pm
by ecardamone
Hi,
I have two times series, x1 and x2 dated 1997 to 2013. Both series have negative observations in some periods, that I would like to turn into NA. Is there a simple way to do this? I have tried

Code: Select all

if x1>0 then x1=na else x1=x1 endif

but that doesn't work. I get an error message saying "NA found in matrix in..."

I am using EViews 9.

Thanks for help!

Re: Assign special values for some observations in a series

Posted: Mon Sep 21, 2015 1:28 pm
by EViews Gareth

Re: Assign special values for some observations in a series

Posted: Mon Sep 21, 2015 1:44 pm
by EViews Glenn

Re: Assign special values for some observations in a series

Posted: Tue Sep 22, 2015 6:14 am
by ecardamone
Thank you very much! @recode worked great.