| Date: | Mon, 24 Jan 2005 12:36:41 -0600 |
| Reply-To: | "Oliver, Richard" <richard@spss.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | "Oliver, Richard" <richard@spss.com> |
| Subject: | Re: Missing values for string variables |
|
| Content-Type: | text/plain; charset="us-ascii" |
You can define user-missing values for short string variables (8 bytes or less), but not for long string variables (more than 8 bytes).
You can autorecode long strings into consecutive integers, preserving the original string values as value labels), and then define missing values for the new integer values.
data list free /longstr (a20).
begin data
"a string"
"another string"
" "
end data.
autorecode longstr /into numvar.
*the blank comes first in sort order and so gets assigned the integer value 1.
missing values numvar (1).
*in SPSS 13, you can automatically assign string blanks as user-missing in the
autorecoded variable.
data list free /longstr (a20).
begin data
"a string"
"another string"
" "
end data.
autorecode longstr /into numvar /blank=missing.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Stewart, Suzanne
Sent: Monday, January 24, 2005 12:15 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Missing values for string variables
> I would like to define missing values for string variables and can't
> seem to do that. The Help Section says this:
>
> All string values, including null or blank values, are considered to
> be valid unless you explicitly define them as missing. To define null
> or blank values as missing for a string variable, enter a single space
> in one of the fields under the Discrete missing values selection.
> This doesn't seem to work though as I am not able to change anything
> (or even access) under Missing for strings variables like you can for
> numeric variables.
> I hope this makes sense. I am really stuck here and need to find the
> quickest and easiest way to define missing values for string variables
> without recoding them all!
>
> Any help you can provide would be MUCH appreciated.
> Thanks,
> Julie
>
>
>
>
|