finding missing values

#1
I have a number of measures with 113 questions. I have set up my SPSS data window so that the first column is the subject Id and the rest are the individual quetsion numbers (e.g Q1...Q113) with applicable scores. When the subject did not answer a particular question it was left blank in the data window. How can I determine the amount of questions that were left unanswered by each subject? I need to know for each subject which questions they may have missed.
 

TheEcologist

Global Moderator
#4
I have a number of measures with 113 questions. I have set up my SPSS data window so that the first column is the subject Id and the rest are the individual quetsion numbers (e.g Q1...Q113) with applicable scores. When the subject did not answer a particular question it was left blank in the data window. How can I determine the amount of questions that were left unanswered by each subject? I need to know for each subject which questions they may have missed.
There are two ways to do this as far as I know. Here's the most simple way is this. To count the # of missing variable in a string variable (called Q1 her below) you first create a new variable. This new variable (here called missing) will be coded zero if not empty (e.g. there is something there,anything) and one if it is empty (or completely blank). You do it like this (syntax):

Code:
 compute missing = (length(rtrim(Q1)) = 0).
    execute.
This creates a new variable called missing which will indicate the missing values for Q1. You use the two functions length & rtrim and a logical command to compute 1's or 0's. The rtrim function trims any blank spaces from the right of the variable but If there is nothing, the trimmed length becomes zero (The command 'length' determines length of the trimmed value (which is 0 when emty). The logical expression then turns it in a binary value.

Next, you use the following code to compute a summary or use an appropriate menu item.

Code:
   desc var = missing
     /statistics = sum.
 
#5
Hi Godfather,

If you are lucky enough to have the SPSS Missing Values Module, there is a function in there that charts exactly that. It has a number of other nice tables as well, such as the number of subjects with each exact missing data pattern.

Karen