SPSS has a
NMISS function, so you might be able to accomplish this in essentially the same
way that I do in SAS. Also consider using the MEAN.n function. I
don't know if there is a SUM.n function in SPSS. See http://core.ecu.edu/psyc/wuenschk/SAS/Help/NMISS-SAS.txt and
http://core.ecu.edu/psyc/wuenschk/SAS/Help/Sum-SAS.txt.
Let me know what works.
Karl
W.
-----Original Message-----List mates:
From: Lise DeShea [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 4:22 PM
To: [EMAIL PROTECTED]
Subject: simple question re SPSS
I have such an easy question that I can't believe I'm asking it. It's so simple that I guess SPSS's web people could never fathom that someone would need to ask.
I've coded missing data as "-1." I've specified in the Variable View that "-1" stands for missing data. I want to create new variables (summing items on a scale). I've written the syntax:
~~~
COMPUTE GRAT = SUM (g101, g102, g103r, g104, g105, g106r).
VARIABLE LABEL GRAT 'GQ6 Gratitude Scale'.
FORMAT GRAT (f1.0).
EXECUTE.
~~~
But I need to specify that if one of the variables in the SUM statement has a missing value, then the new variable GRAT also should be missing. How do I do that?
