## NA versus zero values

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

RDS
Posts: 70
Joined: Thu Feb 17, 2011 9:50 am

### NA versus zero values

I have some time series that in some periods have "NA"

I set the "NA" to zero with the following expression:

smpl @all if SERIES1 =NA
genr SERIES1 = 0

However, when I sum SERIES1 with another complete SERIES2, the generated SERIES3 has exactly the "NA" of SERIES1:
SERIES3 = SERIES1 + SERIES2 (SERIES3 contains "NA")

Amazingly, if I open as a group SERIES3 and SERIES1, SERIES3 does no longer contain the "NA"
What's going on?

EViews Matt
EViews Developer
Posts: 336
Joined: Thu Apr 25, 2013 7:48 pm

### Re: NA versus zero values

Hello,

When you say that "SERIES3 has exactly the 'NA' of SERIES1", do you mean that SERIES3 has NAs for the same observations that SERIES1 did originally, or do you mean that SERIES3 has NAs for all the other observations (the original non-NA observations of SERIES1)? If it's the latter, you just forgot to return to the full sample (smpl @all) before adding the two series.

RDS
Posts: 70
Joined: Thu Feb 17, 2011 9:50 am

### Re: NA versus zero values

Yes, SERIES3 has NAs for the same observations that SERIES1 did originally

startz
Non-normality and collinearity are NOT problems!
Posts: 3418
Joined: Wed Sep 17, 2008 2:25 pm

### Re: NA versus zero values

Is it possible that in one case you are only looking at the current smpl and that in the other you are looking at all observations?

EViews Matt
EViews Developer
Posts: 336
Joined: Thu Apr 25, 2013 7:48 pm

### Re: NA versus zero values

Yes, this seems like a sample issue. Does the following sequence result in NAs in SERIES3?

Code: Select all

`smpl @all if SERIES1 = naSERIES1 = 0smpl @allSERIES3 = SERIES1 + SERIES2`