changing non-numeric variable values to append

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: ... port-faqs/
Post Reply
Posts: 1
Joined: Mon Apr 08, 2019 2:26 pm

changing non-numeric variable values to append

Post by Lizpinder »


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.



Posts: 1182
Joined: Mon Oct 19, 2009 10:34 am

Re: changing non-numeric variable values to append

Post 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.

Post Reply