# finding missing values

#### godfather

##### New Member
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.

#### CB

##### Super Moderator
Not sure in SPSS, but in Excel you could use the formula Countif - i.e. countif cell="".

#### WeeG

##### TS Contributor
try to create a transpose to your data matrix, and then you can check frequencies regulary ( I think ).

#### TheEcologist

##### Global Moderator
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.

#### TheAnalysisFactor

##### New Member
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

#### godfather

##### New Member
thanks for all your suggestions. I have resolved the issue by using the count feature and selecting missing data