Problem recoding '0' to '99'

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem recoding '0' to '99'

J McClure
Hi,
I want to recode a variable and for one of the values of the old
variable '0' I want to change it to missing for the new variable.
However, when I run this code, the frequency table includes a category
of '0' with a frequency of 78. The data editor does show 99 as the value
for missing and I don't get any error messages.

Recode MD_Type (0=99) (1=1)  (2 thru 4 =2) (5 thru 17 = 0) into MD_Type_C.
VARIABLE LABELS MD_Type_C 'Type of  '.
VALUE LABELS MD_Type_C 1 'Resident' 2'Attending'.
Missing values MD_Type_C (99).
FREQUENCIES  MD_Type_C.

Thanks for any help!
Jan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Problem recoding '0' to '99'

mpirritano
You did recode 5 thru 17 as '0'. So those should be the zeros. Right?

Matthew Pirritano, Ph.D.
Research Analyst IV
Medical Services Initiative (MSI)
Orange County Health Care Agency
(714) 568-5648


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
J McClure
Sent: Tuesday, November 16, 2010 9:33 AM
To: [hidden email]
Subject: Problem recoding '0' to '99'

Hi,
I want to recode a variable and for one of the values of the old
variable '0' I want to change it to missing for the new variable.
However, when I run this code, the frequency table includes a category
of '0' with a frequency of 78. The data editor does show 99 as the value
for missing and I don't get any error messages.

Recode MD_Type (0=99) (1=1)  (2 thru 4 =2) (5 thru 17 = 0) into
MD_Type_C.
VARIABLE LABELS MD_Type_C 'Type of  '.
VALUE LABELS MD_Type_C 1 'Resident' 2'Attending'.
Missing values MD_Type_C (99).
FREQUENCIES  MD_Type_C.

Thanks for any help!
Jan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Problem recoding '0' to '99'

Rick Oliver-3
In reply to this post by J McClure
Well, you recoded 5 thru 17 to 0.


From: J McClure <[hidden email]>
To: [hidden email]
Date: 11/16/2010 11:30 AM
Subject: Problem recoding '0' to '99'
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Hi,
I want to recode a variable and for one of the values of the old
variable '0' I want to change it to missing for the new variable.
However, when I run this code, the frequency table includes a category
of '0' with a frequency of 78. The data editor does show 99 as the value
for missing and I don't get any error messages.

Recode MD_Type (0=99) (1=1)  (2 thru 4 =2) (5 thru 17 = 0) into MD_Type_C.
VARIABLE LABELS MD_Type_C 'Type of  '.
VALUE LABELS MD_Type_C 1 'Resident' 2'Attending'.
Missing values MD_Type_C (99).
FREQUENCIES  MD_Type_C.

Thanks for any help!
Jan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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