# Missing data.......Help needed!

#### ramkaos

##### New Member
So I'm handling a database that uses the total sum of 41 variables as a measure. I created a new variable with the syntax command "compute" sum= 1+2+....+41.

But when a particular individual has even 1 answer with missing data I end up with missing data in the sum computed variable (makes sense).

I searched for an alternate method, and since missing data isn't actually more than even 5% per each individual I want to do the compute mean and multiply by case method posted here: http://core.ecu.edu/psyc/wuenschk/SAS/Help/Sum-SAS.htm

But the NMISS function in SPSS 17 (version I'm using) seems to be missing.

Any ideas?

Thanks!

#### helicon

##### Member
It seems extremely odd that the NMISS function would be missing. Try calling it through syntax:

Code:
compute n.missing=nmiss(v1 to v42).
exe.
If it truly is missing, then the following code will do the same thing.

Code:
count n.missing = v1 to v42 (sysmis).
exe.
Of course, you need to change the variable names and the missing value if it isn't sysmis in your datafile.

#### ramkaos

##### New Member
By the way, if these commands are to be prepared via syntax, they are missing as well, at least in version 17.

#### Karabiner

##### TS Contributor
For a sum:
COMPUTE newvar1=SUM(var1 to var41)
"SUM" ignores missings.

For a mean:
COMPUTE newvar2=MEAN(var1 to var41)
"MEAN" calculates the mean with only the valid values.

Kind regards

K.