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: 86
Joined: Thu Feb 17, 2011 9:50 am

NA versus zero values

Postby RDS » Sat Jun 23, 2018 12:47 am

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: 557
Joined: Thu Apr 25, 2013 7:48 pm

Re: NA versus zero values

Postby EViews Matt » Sat Jun 23, 2018 6:35 am

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: 86
Joined: Thu Feb 17, 2011 9:50 am

Re: NA versus zero values

Postby RDS » Thu Jun 28, 2018 12:10 am

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

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

Re: NA versus zero values

Postby startz » Thu Jun 28, 2018 8:32 am

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: 557
Joined: Thu Apr 25, 2013 7:48 pm

Re: NA versus zero values

Postby EViews Matt » Thu Jun 28, 2018 9:11 am

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

Code: Select all

smpl @all if SERIES1 = na
SERIES1 = 0
smpl @all
SERIES3 = SERIES1 + SERIES2


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 11 guests