Often you may want to replace missing values with zero in SPSS.
The easiest way to do this is by using Transform > Recode into Same Variables.
The following example shows how to do so in practice.
Example: How to Replace Missing Values with Zero in SPSS
Suppose we have the following dataset in SPSS that contains information about exam scores received by various students in some class:
Notice that there are several missing values in the Exam_Score column.
Suppose that we would like to replace each of these missing values with zeros.
To do so, click the Transform tab, then click Recode into Same Variables:
In the new window that appears, drag the Exam_Score variable into the Numeric Variables box:
Then click the Old and New Values button.
In the new window that appears, click the button next to System-missing under OId Value and then type 1 into the New Value box, then click the Add button:
This new recoding rule will be shown in the Old –> New box.
Lastly, click Continue. Then click OK.
Each missing value in the Exam_Score column will now be replaced with a zero instead:
Note that in this example we only replaced missing values with zero in one column, but you can use this same process to replace missing values in as many columns as you’d like.
The following tutorials explain how to perform other common operations in SPSS: