This is a complimentary tip available to SPSS Direct subscribers.
I’m using SPSS 16.0 and have missing values in my data file. I am writing syntax to manipulate my data and need to reference the missing values. Looking at the SPSS Syntax Reference Guide, I see references to SYSMIS, $SYSMIS, and SYSMIS() at various places. How do I determine which to use?
In all three of these examples, SYSMIS, $SYSMIS, and SYSMIS() are related to system-missing values. Each of them should be used in a specific context, and using the wrong reference typically causes errors in the output.
SYSMIS is an input and output keyword. In the SPSS Syntax Reference Guide, SYSMIS is documented in the commands that use this keyword, such as RECODE.
Use SYSMIS when you want to recode some value(s) as system missing, or to recode a system-missing value into some other value. In the example below, system-missing values would be recoded to “99.” In addition, any cases with a “10” for variable v1 would be recoded to system missing.
RECODE v1 (SYSMIS = 99) (10 = SYSMIS). $SYSMIS is a system variable for a system-missing value. In the SPSS Syntax Reference Guide, it is documented in the Universals section under “variables.” Use $SYSMIS when you want to set the values of a numeric variable to system missing. For example, if you have a variable (v1) that has three cases (1, 2, and 3), the following commands
IF (v1 < 2) v1 = $SYSMIS.
EXE.
would transform the data to:
V1
.
2
3
Predictive Analytics
can make your organization
more
successful