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 |
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 |
In reply to this post by J McClure
Well, you recoded 5 thru 17 to 0.
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 |
Free forum by Nabble | Edit this page |