Question & Answer
How do I select cases that are not equal to system missing or another value using both the windows and SPSS syntax?
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) .
16 June 2018