Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 39 ยท Interface and Data

Value Labels and Missing Values in SPSS: User-Missing vs System-Missing

Label coded values in SPSS and declare missing values correctly: system-missing versus user-missing, discrete and range codes, how procedures treat them, and common pitfalls with 99 and 999.

Two settings in Variable View do more for the correctness of your results than any other: value labels (what a code means) and missing values (which codes are not real answers). Get them right once, and every table and test in the project becomes readable and honest. Get them wrong, and an average age includes the code 999 for "not stated".

Value labels

A coded variable stores numbers but should display words. Click the cell in the Values column to open Value Labels:

  1. Type the Value (for example 1).
  2. Type the Label (for example Female).
  3. Click Add. Repeat for each code, then OK.

The syntax is a single command:

TEXT
VALUE LABELS gender 1 'Female' 2 'Male' 3 'Other'
  /satis 1 'Very low' 2 'Low' 3 'Medium' 4 'High' 5 'Very high'.

Value labels can be up to 120 bytes, and a label can be set for a code that is also missing (for example 99 'Prefer not to say'). Labels are shown in output tables, charts and dialogs, and you can toggle between codes and labels in Data View with View > Value Labels.

Tips:

  • Label every code, including the "don't know" ones. Unlabelled codes show as bare numbers in output.
  • Keep codes consistent across similar variables (always 1 = Yes, 2 = No), so you can reuse the labels.
  • Use Data > Define Variable Properties... to see all observed values with their counts and label them in one pass, or Copy Data Properties... to reuse labels across files.
Python Stand-in: value labels turn codes into words

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The last case shows the problem of an unlabelled code: 9 has no meaning in the output.

Two kinds of missing

SPSS distinguishes:

  • System-missing: the cell is empty. In numeric variables it shows as a period (.) in Data View. SPSS also creates system-missing values when a calculation cannot be done (a division by zero, a function on a missing input).
  • User-missing: a real code you declared meaningless for analysis, such as 99 = No answer, 98 = Don't know, -1 = Not applicable. The code is stored in the file, but SPSS excludes it from analyses by default.

User-missing values are the reason questionnaires keep "Don't know" as a code instead of an empty cell: you can count how many did not know (a result on its own) and still exclude them from the mean.

Declaring missing values

Click the Missing cell for the variable. In the dialog:

  • No missing values (default),
  • Discrete missing values: up to three codes (such as 97, 98, 99),
  • Range plus one optional discrete missing value: a low and high bound (numeric variables only), such as -9 through -1, plus one more code.

The syntax:

TEXT
MISSING VALUES age (999).
MISSING VALUES satis (8, 9).
MISSING VALUES income (-9 THRU -1, 99999).
MISSING VALUES region (LO THRU 0).

A string variable can have up to three discrete missing values but no ranges. To remove a declaration, use MISSING VALUES age ().

A missing value code that you have not declared is just a number. If 999 is left undeclared, SPSS happily averages it in. Always check Descriptives (Minimum and Maximum) for suspicious values like 99, 999 and -1.

How procedures treat missing values

Most procedures exclude user-missing and system-missing values, but the way they exclude differs:

Option Meaning
Exclude cases listwise A case is dropped from the whole analysis if it is missing on any variable in the list
Exclude cases pairwise Each statistic uses all cases that have both variables in that pair
Exclude cases analysis by analysis Each variable or test uses all its own valid cases
Include user-missing values A few dialogs (such as Frequencies and Crosstabs tables) can show them

The option is found in the Options... button of the dialog. Note what changes: sample sizes. A correlation matrix with pairwise exclusion may use different N for each cell; with listwise the N is smaller but constant. Always look at the N in your output.

In Frequencies, a table lists user-missing codes under the Missing heading, with their labels, while System missing appears as System. The Valid Percent column excludes them.

Python Stand-in: the same mean, with and without declaring missing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first number is badly wrong; that is exactly what an undeclared code does to a mean.

Missing values in transformations

Declared missing values behave specially in expressions:

  • Arithmetic with a missing operand gives system-missing: age + 5 is missing if age is missing (user or system).
  • Functions such as SUM, MEAN, MIN and MAX ignore missing arguments unless you demand a minimum number of valid ones (MEAN.3(a, b, c, d) needs at least three valid values).
  • MISSING(var) is true for both kinds; SYSMIS(var) is true only for system-missing; VALUE(var) reads the original number of a user-missing value.
  • Comparisons against a missing value are never true, so IF (age > 30) does not select a missing age.

More on these in compute variable and functions. If you want to replace missing values, Transform > Replace Missing Values... offers series mean, mean of nearby points, median of nearby points, linear interpolation and linear trend. For real analyses, prefer to understand the missingness first; the Missing Values add-on offers multiple imputation.

Python Stand-in: system vs user missing and the missing report

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Practical advice

  • Choose one convention for missing codes across the project: -9 or 99, not both. Make sure the code cannot be a real answer.
  • Document codes in the variable Label or a code book.
  • Declare missing values before running analyses and re-check after merging files (declarations belong to the variable definition).
  • Do not leave an empty cell when the meaning matters: record "refused" and "not applicable" as separate codes if you will need them.

Common mistakes

  • Leaving 99 or 999 undeclared.
  • Declaring a code as missing that is a valid answer for some cases (for example 0 for "no children").
  • Forgetting the listwise vs pairwise choice and comparing results with different Ns.
  • Typing a space into a numeric cell, which makes the column a string on import.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the difference between system-missing and user-missing?

    System-missing means no value is stored. User-missing is a stored code (such as 99) that you flag as not valid.
  2. 2. How many discrete user-missing values can a numeric variable have?

    Up to three discrete values, or a range plus one extra discrete value.
  3. 3. Which exclusion option drops a case from the entire analysis if it is missing on any listed variable?

    Listwise deletion removes the case whenever any variable in the list is missing.
  4. 4. Why is an undeclared code 999 dangerous?

    Only declared missing values are excluded. Otherwise 999 is an ordinary number.

Summary

  • Value labels give codes readable names; label every code, including "don't know".
  • System-missing is empty; user-missing is a declared code (up to three discrete values, or a range plus one).
  • Declare missing codes before analysis; check minimum and maximum for stray 99 and 999.
  • Procedures offer listwise, pairwise and analysis-by-analysis exclusion; read the N in your output.
  • Arithmetic with missing values gives missing; functions like SUM and MEAN ignore them.

Next: Saving, Exporting and SPSS File Types