Date: Mon, 15 Sep 2003 23:48:18 -0400
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: SPSS to SAS Unix
In-Reply-To: <Pine.A41.4.44.0309151535510.23422-100000@mead11.u.washingt
on.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 03:44 PM 9/15/2003 -0700, Sally Zitzer wrote:
> I just saved a SAS file from SPSS on the PC, selecting the version
> for Unix that has the file extension .ssd01. After uploading to our
> Unix system and running some SAS analyses I have discovered that the
> missing values, which are clearly defined in the SPSS 11.5.2.1 file
> in the Data Editor, are not missing values in Unix SAS 8.2. The
> missing values are -1 for all variables in the SPSS file and they
> show up as the Minimum value in proc means in SAS (ie, as VALID
> data). In other words, the SAS file that SPSS made did NOT flag the
> missing values.
I'm interested that they all come across as -1, which I would not have
expected.
SAS, unless they've changed something very radically in release 8, does
not recognize 'missing' values within the normal numeric range. SAS
missing values have long been "." (corresponding to SPSS
system-missing) and the special values ".A" to ".Z", which in fact few
people use.
Does the SPSS documentation say anything about how it treats missing
values in writing a SAS file, or whether there are any options for how
to treat them? You shouldn't be stuck with what you're getting.
As a work-around, either of the following should work, but both have drawbacks:
A) Recode all your missing values to system-missing. You'll lose any
distinction between missing values (one of the very useful features of
SPSS), but *probably* all the system-missing values will be exported as
the SAS value ".".
B) Un-define all your user-missing values for all your variables. They
should then transfer to SAS with their correct numeric values. In SAS,
convert these to SAS missing values. (There's no equivalent of RECODE;
you have to use a chain of
IF ... THEN .....;
ELSE IF .... THEN .....;
statements.) You can, in this case convert different SPSS values to
different SAS missing values, if you like. However, of course this
approach takes more coding in SAS, with, therefore, more opportunity
for errors.
>I just wanted to alert people to this and wonder if anyone else has
>come across this. I'm going to try a file for PC SAS tomorrow and see
>if the missing values are flagged there.
Again, unless SAS has changed something drastically recently, I don't
think they will be. They may be handled in some more intelligent way
than by all being converted to the same arbitrary numeric value, however.