| Home | ESDS | A-Z index | Site map | Contact | Login | Search: 
ESDS Government logo - link to ESDS Government home page

ESDS Government


mergemod

Notes from the GHS

Question

I am using the GHS over a number of years. The 1983 GHS (as well as for other years) prior to 1998 is divided in a number of small datasets (modules) (i.e. person data, household data, income data, etc.). I have been searching the ESDS and the UK Data Archive homepages to look for instructions about merging the different modules. However, I haven't found such information. The only two common variables which allow merging the different data files are "hserno" and "persno". By applying the command "merge hserno persno" one can uniquely identify observations in the master data. However, there is only one common variable "hserno" between the household data module (household.dta) and the person data module (person.dta). So, if I do "merge hserno" the command I get from Stata is that "variable hserno does not uniquely identify observations in the master data" whereas my master data is the individual data "person.dta". Also, shall one keep observations that occur in both datasets (i.e. when the variable "_merge" is equal to 3)? If this is the case, then too many observations are being thrown away. Furthermore, how can one derive individual identification numbers through the household serial number variables and other variables? Are there some instructions on this?

Answer

The household file is household level data, It therefore only has one record per household. The person file has many records per household as it is at the individual level. This is why the only indicator that they have in common is the household serial number. Looking at the help pages of the merge command in Stata seems to suggest that you should be using an option on one to many matches. Because the household serial is unique in the household file but not in the person file you should use the uniqusing option when the household file is the using file. I've tried this with the 1996 data and this results in all _merge values equalling 3.



ESDS Home Page > Government > Ghs > Notes
_
  Page last updated 23 April 2012
© Copyright 2003 - 2012 Universities of Essex and Manchester. All rights reserved.
Contact   |    Copyright and Disclaimer    |    Accessibility |   Send us comments on this page
Link to University of Essex Link to University of Manchester Link to JISC Link to ESRC