merge CR file with IR [message #23823] |
Wed, 08 December 2021 23:03 |
Tedy
Messages: 14 Registered: July 2020
|
Member |
|
|
Hello dear DHS database experts, please I need the stata codes to merge the couple file (CR) with the woman file (IR).
|
|
|
|
|
Re: merge CR file with IR [message #23827 is a reply to message #23826] |
Fri, 10 December 2021 07:51 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
With this merge, it will make no difference whether you start with the IR file as the "master" file and the CR file as the "using" file, or the other way around. The only difference will be that if you do it one way, "_merge" will be coded 1 for the IR cases that are not in the CR file, and if you do it the other way, those cases will be coded 2. But that's automatic and Stata will tell you. (For this merge, there will be NO cases that are in the CR file and not in the IR file.)
I usually take the larger file as the "master" and the smaller file as the "using" but I'm not consistent about that because it really only makes a difference if your program does something next based on _merge being 1 or 2.
As a general rule, when you have to choose between doing A or B with Stata, I'd just try both, see if they "work", and then see if they give different results.
[Updated on: Fri, 10 December 2021 07:51] Report message to a moderator
|
|
|
|
|
|
Re: merge CR file with IR [message #23841 is a reply to message #23834] |
Mon, 13 December 2021 10:11 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is another response from DHS Research & Data Analysis Director, Tom Pullum:
In the PR file, the line numbers of the parents (if living with the child) are given by hv112 (for the mother) and hv114 (for the father). You do not know for sure that the male partner of the mother in the couples file is the father. Also the CR file will not contain all mothers and fathers who are living in the same household as the child.
|
|
|