|
Title
[U] 12.2.1 Missing values
Description
Stata has 27 numeric missing values:
., the default, which is called the "system missing value" or sysmiss
and
.a, .b, .c, ..., .z, which are called the "extended missing values".
Numeric missing values are represented by large positive values. The ordering is
all nonmissing numbers < . < .a < .b < ... < .z
Thus, the expression age > 60 is true if variable age is greater than 60 or missing.
To exclude missing values, ask whether the value is less than ".". For instance,
. list if age > 60 & age < .
To specify missing values, ask whether the value is greater than or equal to ".". For
instance,
. list if age >=.
Stata has one string missing value, which is denoted by "" (blank).
Remarks
More details concerning missing values and their treatment in Stata are provided under
the following headings:
Overview
Expressions
Operators
Functions
Matrices
Useful commands
Value labels
Estimation commands
Technical note: checking if a value is missing
Overview
1. Stata supports different types of numeric missing values that can be used to
specify different reasons that a value is unknown. The most frequently used
missing value ., referred to as sysmiss, is nearly always generated by Stata when
it cannot assign a specific value. The 26 extended missing values .a, .b, ..., .z
are available to users requiring more elaborate tracking of missing values.
Empty strings are treated as missing values of type string.
2. Numeric missing values are represented by large positive values. This means that
an expression such as income > 100 evaluates to true for missing values of the
variable income, as well as to those that are greater than 100. Also, the simple
expression if varname evaluates to true for all nonzero values of varname,
including missing values.
3. The ordering of missing values is
all nonmissing numbers < . < .a < .b < ... < .z
4. Most Stata statistical commands deal with missing values by disregarding
observations with one or more missing values (called "listwise deletion" or
"complete cases only").
|