The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging in STATA
Re: Merging in STATA [message #645 is a reply to message #619] Mon, 22 July 2013 09:51 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3062
Registered: February 2013
Senior Member
Response from: Sarah Bradley, DHS Expert

For merging male and female files: the easiest option is to use the couple's recode (CR file) which already has husbands and wives merged together.

If you then want to make the child the unit of analysis, you could merge the CR file to the BR file, first sorting and then merging on the variable "caseid" which uniquely identifies the mother.

For help merging in Stata, type "help merge" into your command window. This will bring up Stata documentation on using the merge command.
To keep only selected variables, type "keep varlist" where varlist is the variables you want to keep. To delete variables, type "drop varlist".
For more details on the keep or drop commands, type "help keep" or "help drop" into your command window.

Hope that helps!
Sarah
 
Read Message
Read Message
Previous Topic: Merging Wealth Index data with Children's data
Next Topic: Merging Individual and Household data
Goto Forum:
  


Current Time: Tue May 21 14:33:24 Coordinated Universal Time 2024