About this Resource

It is quite common to find that you have macro unit identifiers in both your macro and micro data sets but they aren't coded in quite the same way. There are various strategies for dealing with this situation. If they are both numeric, you will probably have to recode one so that it is consistent with another, and it needs to be coded in the same way in both data sets, but it doesnt matter how this is achieved. If they are both alphanumeric or 'string' variables, you will have to edit one so that it is consistent with the style of the other like the other. It will normally be easier for you to edit the macro data set since has only one row per macro unit. If one dataset has an alphanumeric macro unit identifier, and the other has a numeric identifier with value labels, it is usually best to edit the value labels so that they are consistent with the alphanumeric coding and then convert the numerical variable into an alphanumeric one using the former value labels. In Stata this is done using the decode command.

The University of Manchester; Mimas; ESRC; RDI

Countries and Citizens: Unit 4 Combining macro and micro data by Steve Fisher, University of Oxford is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence.