Search code examples
spss

SPSS: Recode command


What does this syntax mean?

Recode 
variable1 variable2 (ELSE=SYSMIS)  .
EXECUTE .

I cant seem to find any example with the recode command where only variables are stated and no values to recode. Does this mean it will just copy whatever value of variable1 and variable2 for a given record?


Solution

  • That is a roundabout way of setting the variables to system missing. It's equivalent to compute variable1 = $sysmis. compute variable2 = $sysmis.

    But it does both in a single command.

    It works because without a recode list, everything falls into the ELSE category.