Re: Merging in STATA [message #645 is a reply to message #619] |
Mon, 22 July 2013 09:51  |
Bridgette-DHS
Messages: 3230 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
|
|
|