The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » CR-KR Merger (Syntax)
CR-KR Merger [message #29994] Sun, 08 September 2024 05:03 Go to next message
Noyel Sebastian is currently offline  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 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
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 #30022 is a reply to message #29994] Thu, 12 September 2024 02:43 Go to previous messageGo to next message
franciscopage is currently offline  franciscopage
Messages: 1
Registered: September 2024
Member
Merging the Couples Recode (CR) and Kids Recode (KR) from NFHS to get father's characteristics is possible, but it's tricky because these datasets are structured differently. Typically, the CR dataset contains couple-level information, while the KR dataset focuses on children.

Re: CR-KR Merger [message #30081 is a reply to message #30022] Fri, 20 September 2024 11:00 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
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.
Previous Topic: v717
Next Topic: Population for cause specific mortality rate from va dataset
Goto Forum:
  


Current Time: Sat Nov 23 02:54:18 Coordinated Universal Time 2024