Command Reference : Special Expression Reference
  
 
na
Not available code. “NA” is used to represent missing observations.
Examples
smpl if y >= 0
series z = y
smpl if y < 0
z = na
generates a series Z containing the contents of Y, but with all negative values of Y set to “NA”.
NA values will also be generated by mathematical operations that are undefined:
series y = nrnd
y = log(y)
will replace all positive value of Y with log(Y) and all negative values with “NA”.
series test = (yt <> na)
creates the series TEST which takes the value one for nonmissing observations of the series YT. A zero value of TEST indicates missing values of the series YT.
Note that the behavior of missing values has changed since EViews 2. Previously, NA values were coded as 1e-37. This implied that in EViews 2, you could use the expression:
series z = (y>=0)*x + (y<0)*na
to return the value of Y for non-negative values of Y and “NA” for negative values of Y. This expression will now generate the value “NA” for all values of Y, since mathematical expressions involving missing values always return “NA”. You must now use the smpl statement as in the first example above, or the @recode or @nan function.
Cross-references
See “Missing Values” for a discussion of working with missing values in EViews.