CR-KR Merger [message #29994] |
Sun, 08 September 2024 05:03 |
Noyel Sebastian
Messages: 11 Registered: March 2024
|
Member |
|
|
I am trying to merge the Couples Recode and Kids Recode of NFHS (India- DHS) to be merged. Can you help me with the syntax? I want to get the father's characteristics in the analysis. Is this CR-KR merger a viable option to do so?
Thank You
|
|
|
Re: CR-KR Merger [message #30014 is a reply to message #29994] |
Tue, 10 September 2024 12:32 |
Janet-DHS
Messages: 880 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
In the NFHS-4 and -5, only 1/6 of men were interviewed, so at most 1/6 of children in the KR file will merge with the couples in the CR file. Moreover, we do not know that the woman's current partner is the father of the child. For example, the mother may have been widowed and remarried.
If you want to proceed, open the CR file and reduce it to v001, v002, v003, and the m* variables. The CR variables for the mother are already in the KR file and you don't need to copy them (you can check to see if there are exceptions). Save this file with a temporary name. Then open the KR file and do a m:1 merge with v001 v002 v003 in the temporary file (m:1 because there can be many children per mother). This will add the m* variables for the male partner to the child's record.
|
|
|
|
Re: CR-KR Merger [message #30081 is a reply to message #30022] |
Fri, 20 September 2024 11:00 |
Janet-DHS
Messages: 880 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
The following two Stata commands are all that is necessary to merge the CR data onto the KR file, illustrated with the Kenya 2022 survey:
use "...KEKR8CFL.DTA", clear
merge m:1 v001 v002 v003 using "...KECR8CFL.DTA"
To run this, all you have to do is insert the paths to the KR and CR files. Note that many variables for the mother are in BOTH the CR and KR files. For those duplicates, the value in the CR file will overwrite the values in the KR file, but that should not be a problem. An alternative would be to drop the duplicates from one file or the other before the merge. I recommend that you check the correspondences between the files, because sometimes groups of variables appear as NA (a dot) in the merged file but they are not actually NA.
After these commands you can enter "tab _merge". The following appears:
. tab _merge
_merge | Freq. Percent Cum.
------------------------+-----------------------------------
master only (1) | 14,706 68.92 68.92
using only (2) | 1,807 8.47 77.39
matched (3) | 4,824 22.61 100.00
------------------------+-----------------------------------
Total | 21,337 100.00
_merge is 1 for children who do not match with any couples in the CR file: the child's mother is in the IR file but she does not have a partner
_merge is 2 for couples who do not match with any children: the woman in the couple does not have any children in the KR file
_merge is 3 for children who DO match with a couple in the CR file
You probably want to add these lines:
keep if _merge==3
drop _merge
There may not be as many matches (code 3) as you would expect, but remember that these are only births in the past 5 years. the percentages of births with code 3 would be higher for the BR file.
Note also that the mother's partner in the CR file is not necessarily the biological father of the child. The father may have died, may live elsewhere, the parents may be separated or divorced, etc. If the biological father is in the household, he is specified by line lv114 on the child's record in the PR file. Otherwise, the biological father is not in the data files.
|
|
|