Date: Tue, 16 Sep 2003 11:01:54 -0700
Reply-To: Sally Zitzer <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Sally Zitzer <email@example.com>
Subject: Re: SPSS to SAS Unix
Content-Type: TEXT/PLAIN; charset=US-ASCII
I can't find anything in the SPSS documentation that discusses missing
values when saving a SAS format file. I tried the same thing saving a
SAS Windows file (.sas7bdat) and in SAS 8 for Windows the same thing
happened. The -1's were treated as valid data.
It seems to me this should emphasized in the SPSS documentation to alert
people that they have to deal with user missing values themselves.
On Mon, 15 Sep 2003, Richard Ristow wrote:
> 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 220.127.116.11 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
> 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.