IBM Support

How do I select cases that are not equal to system missing or another value using both the windows and SPSS syntax?

Question & Answer


Question

How do I select cases that are not equal to system missing or another value using both the windows and SPSS syntax?

Answer

The best way to select cases that are not equal to system missing or another value is to use the NOT condition in an IF statement. The NOT condition can be expressed in two ways; the tilda '~' symbol and the word 'NOT'. Please use the following steps to create a NOT condition using the menus

1. Click on the menu Data ->Select Cases
2. Choose the option 'If condition is satisfied' and click IF
3. In the expression box type in the following expression:

~ (SYSMIS(var1) | SYSMIS(var2) | SYSMIS(var3))

another way is to write it as

NOT(SYSMIS(var1) | SYSMIS(var2) | SYSMIS(var3))

4. Click continue and OK.


If you want to sum cases that are not missing, you can use syntax:

IF NOT(sysmis(var1) OR sysmis(var2) OR sysmis(var3)) var4 = SUM(var1,var2,var3) .
EXECUTE .

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"19.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

34053

Document Information

Modified date:
16 April 2020

UID

swg21479603