LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 13 May 2008 14:40:43 -0400
Reply-To:   Richard Ristow <>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
Comments:   RFC822 error: <W> MESSAGE-ID field duplicated. Last occurrence was retained.
From:   Richard Ristow <>
Subject:   Re: missing values in do if
Comments:   To: Keval Khichadia <>
Comments:   cc: Melissa Ives <>,
Content-Type:   text/plain; charset="us-ascii"; format=flowed

I wrote too quickly. What I wrote was right, but not enough. At 01:19 PM5/12/2008, Keval Khichadia wrote:

>[In the following syntax] I get the correct value (1) for LowIncome >but there are several cases when there are values for num_in_family >and Fisap_Income where the value should be 0 but I am getting $sysmis

The code I sent, ... else if SYSMIS(num_in_family) | SYSMIS(Fisap_Income). compute LowIncome = $sysmis. else. compute LowIncome = 0. end if.

won't be reached if either variable is missing, because the first test,

>do if num_in_family = 1 & Fisap_Income <= 19600.

will return 'missing' in that case, and the rest of the DO IF will be skipped.

You need something like this, checking for missing values at the *beginning* of the DO IF:

MISSING VALUES LowIncome(9). DO IF SYSMIS(num_in_family) | SYSMIS(Fisap_Income). . compute LowIncome = 9. else if num_in_family = 2 & Fisap_Income <= 26400. . compute LowIncome = 1. ... else. . compute LowIncome = 0. end if.

Note that 9 is defined as a user-missing value for "LowIncome", and that, not SYSMIS, is the value it's given if you have missing data. Art Kendall's right about this one.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

Back to: Top of message | Previous page | Main SPSSX-L page