By Ruben Geert van den Berg on January 20, 2015 under SPSS Data Preparation Tutorial.

SPSS Data Preparation 6 – Inspect Cases

9. Missing Values per Case

(Overview and data file are are found here)

Missing values complicate some analyses or may sometimes indicate that respondents didn't fill out the questionnary very seriously. In any case, it's a good idea to at least check how missing values are distributed over respondents and we often do so for sections of variables separately. Do make sure that user missing values have been properly specified for all relevant variables.
As an example, we'll count missing values over q2 to q5 with the syntax below.

SPSS Missing Values Per Case Syntax

*1. Specify 6 as user missing value for relevant variables.

missing values q2 to q5 (6).

*2. Compute variable mis_1, holding number of missing values over q2 to q5.

compute mis_1 = nmiss(q2 to q5).

*3. Apply variable label to mis_1.

variable labels mis_1 "Number of missing values over q2 to q5".

*4. Inspect frequency table of mis_1.

frequencies mis_1.

Result

SPSS Data Preparation - Missing Values per Case

Note that 2 respondents have missing values on all 4 variables and 1 has 3 missing values. If we want to visually inspect these cases, we can easily move them to the top of data view by running sort cases by mis_1(d).

Exclude Cases from Analysis

We decide to exclude cases with 3 or more missing values on q2 to q5 from our analyses. A great way for doing so is by FILTER. The syntax below shows how to do so in a clean and fast way.

*1. Create filter variable holding 1 for cases with mis_1 < 3 and 0 for other cases.

compute filt_1 = (mis_1 < 3).

*2. Apply label to filter variable.

variable labels filt_1 "Case has less than 3 missing values over q2 to q4".

*3. Filter by new filter variable.

filter by filt_1.

*4. Confirm filter works properly.

frequencies mis_1.

Result

SPSS Frequencies Table

Note that the three cases with 3 or more missing values no longer appear in the output; instead of 601 cases, 598 cases are now reported on. Also note the strikethrough in data view for the cases that have been excluded by FILTER.

SPSS Filtered Cases in Data View

For now, we'll reinclude the excluded cases by simply running filter off. Note that this obviously makes the aforementioned strikethrough disappear as well.

Comment on this Tutorial

*Required field. Your comment will show up after approval from a moderator.

This Tutorial has 4 Comments