Dear SPSS users, My dataset1 consists of a string variable called "name of barangays in a city", with more than 4000 barangays. The list of barangays along with the corresponding numeric values are stored in dataset2 (a separate file). The goal in dataset1 is to recode the string variable into numeric variable so that the values in the former are the assigned values from dataset2. We cannot use the "automatic recode" in this because we want to use the assigned values from dataset2 ...Is there a way to do this? Any comments are welcome. Thanks Eins |
Sort both files by bnames.
Match files by bnames. If a name can exist more than once, you will to use tables= instead of files=set2. Your big problem is apt to be multiple spellings and typography for names. Force everything to upper case? The time-efficient method, for a one-time task, might be: Select out all the names that do not match, from one or the other, and eyeball some version of these leftovers, either in combined in one file, or as two parallel lists. -- Rich Ulrich Date: Fri, 8 Feb 2013 13:48:17 +0800 From: [hidden email] Subject: More on recoding issue To: [hidden email] Dear SPSS users, My dataset1 consists of a string variable called "name of barangays in a city", with more than 4000 barangays. The list of barangays along with the corresponding numeric values are stored in dataset2 (a separate file). The goal in dataset1 is to recode the string variable into numeric variable so that the values in the former are the assigned values from dataset2. We cannot use the "automatic recode" in this because we want to use the assigned values from dataset2 ...Is there a way to do this? |
In reply to this post by E. Bernardo
Are you sure you cannot do an autorecode on one file and apply the template to the other?
Autorecode can be very helpful for working out variations on spell spacing capitalization etc.
AUTORECODE VARIABLES=varlist
/INTO new varlist
[/BLANK={VALID**}
{MISSING}
[/GROUP]
[/APPLY TEMPLATE=’filespec’]
[/SAVE TEMPLATE=’filespec’]
[/DESCENDING]
[/PRINT]
Art Kendall Social Research ConsultantsOn 2/8/2013 12:48 AM, E. Bernardo wrote:
===================== 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
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |