- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a large SAS dataset, but when I convert it to SPSS, a few variables have incorrect format values and labels. For example, the time variable shows the correct time format (eg. 7:30 AM) in SAS, but is incorrectly displayed in SPSS (. Another variable loses its values. But more than 95% of the formats are displayed correctly. It's not an issue of format names being more than 8 char, as there are several formats with longer names that are displayed correctly in SPSS. Please help solve this issue- Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Without concrete examples this is an exercise in "guessing". Such as explicit values in SAS, with information about variable type, length and assigned format, and the characteristics of the resulting SPSS variable?
I never worked with time variables in SPSS so I haven't specific examples. SAS TIME values are the numbers of seconds since midnight. So if your 7:30 AM looks like 27000 then that is the number of seconds and the value is correct the display is just not what is expected by you.
Did any of the SAS variables have custom formats assigned?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If it makes things easier, this is the format for the time variable:
This is what it looks like in SAS
It fails to take on the format in SPSS, and looks like this:
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In that first picture there is a value that looks like "9: 45 AM". What application is that from? The space between the : and 45 is very suspicious.
You should run Proc Contents on the SAS data set in SAS and show the results. You may have to tell us the actual names of variables as you are currently not providing that information. Your "what it looks like in SAS" picture looks like the output of proc freq???
Another question: How did you convert the data to SPSS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Note that data is best shared as TEXT not photographs.
This is what I think you are trying to show: Te first picture was trying to express the definition for the format attached to the variable (format name not displayed) that is saying to display values like 31 as '7:30 AM'. And the last picture is trying to express that when you look at the SPSS variable (using what?) the raw values are there. Do you know to display value "labels" in SPSS? Can you display both the value and the value label at once?
So in the dataset you converted to SPSS was the format actually attached to the variable? Is the format definition actually accessible in your SAS session?
When you converted the SAS dataset to SPSS did the process that did the conversion know where to find the format definition? SAS formats live in format catalogs, not in the same file as where the actual values are stored.