Liz's Stata Guide

Missing Values

Later versions of Stata have extended missing values. A period (.) is a generic missing value (system miss) -- and is what Stata creates if it needs a missing value when reading in data, or reshaping or creating a new variable. You can also set variables equal to extended missing values: .a, .b, .c to .z. For example, IRCBP datasets use the following conventions:
missing value explanation
. missing in the raw data
.a impossible value / invalid code
.b should be skipped according to skip patterns on survey
.m other these are used when explicit codes for these answers were not given, but the surveyor wrote in something that can best classified as such
.n refused to answer
.o not applicable
.p donít know
All of these extended missing values are counted by Stata as being greater than any number. You should thus use the safe formulations given below.
Safe Risky
if varx < . if varx != .
if varx >= . if varx == .

contact: djiboliz@gmail.com
last modified: 30 April 2007