Hi, Lise! I'm not certain about this, and my ancient SPSS reference manual hasn't surfaced since a recent move, but as I recall, SPSS assigns a missing- value code (some special numerical value exceedingly unlikely ever to be encountered in real data) to replace whatever your own missing-data code was. In ordinary arithmetic (+, -, *, /, **), if any variable in a computation is missing, the result is missing; but I think SPSS does something else (I don't remember exactly what) with functions like "SUM", precisely so that the user could (when desired) obtain the sum (average, etc.) of all the non-missing values, and not have the result vanish into the missing-data code.
Try replacing your command COMPUTE GRAT = SUM (g101, g102, g103r, g104, g105, g106r) with COMPUTE GRAT = g101 + g102 + g103r + g104 + g105 + g106r and see if that has the effect you want. (Or maybe someone more up-to-date than I am will have a better answer.) On Mon, 30 Jun 2003, Lise DeShea wrote in part: > 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? Cheers! -- Don. ----------------------------------------------------------------------- Donald F. Burrill [EMAIL PROTECTED] 56 Sebbins Pond Drive, Bedford, NH 03110 (603) 626-0816 . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
