After linking the micro and macro data you should perform some basic checks to your new combined file. These include checking that, you have the right number of micro unit cases; there are is no macro unit data unlinked to micro data, all the variables from each of the macro and micro data sets are present.

Stata creates a variable called _m in the process of linking/merging. This variable takes the value 3 if a row from one data set was successfully merged with a row from another, or 1 if there was no macro data for a given macro unit, or 2 if there was no micro data for a given macro unit. You will probably want to delete cases where there is no micro data with the command:

drop if _m ==2

The _m variable can take other values if you are using the merge command to update or over-ride variables in the microdata.dta file with those in the macrodata.dta file (see Stata Help system or manuals). It is well worthwhile inspecting this variable to check the merging has worked in the way you expected.

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.