Page 1 of 1

changing non-numeric variable values to append

Posted: Mon Apr 08, 2019 2:55 pm
by Lizpinder
Hi,

I am trying to append data sets from 2 different years. for the variable 'b_s' (branch or subsidy): for 2005, subsidiary = sub, branch = branch. In 2006 subsidiary = a, branch = b.

for 2006, I want to change all 'a' values to 'sub' and all all 'b' values to 'branch'. so that I can append the data sets.

how can I do this? the 'recode' command works only for numerical values.

thanks

Lizzie

Re: changing non-numeric variable values to append

Posted: Tue Apr 09, 2019 9:07 am
by ChrisCharlton
All values in the MLwiN worksheet are stored as numeric (to see these unselect "Show value labels" in the "Data" window), with optional category labels used to assign a string value to each value. You can check these assignments via the "Names" window by clicking "View" in the "Categories" section. If the underlying numbers are the same for both years then after joining the two sets of data you can then set the new columns to categorical and copy/paste the category values from the version that you want to use into the new variable.