Creating Couples' file from IR and MR datasets for India [message #25157] |
Wed, 07 September 2022 23:42 |
dcpathak
Messages: 6 Registered: September 2022
|
Member |
|
|
Hello,
I want to create a couples dataset by merging IR and MR files. I can use the couples' recode dataset already provided, but I need some missing variables. The main purpose is to study domestic violence, and NFHS says one should use an IR file to study domestic violence. I just need a few variables from the MR file to merge with the IR file.
The state codes I used are:
use "D:\DHS data\NFHS 5\Individual & Woman\IAIR7BFL.DTA"
rename v001 mv001
rename v002 mv002
rename v034 mv003
rename v024 mv024
save "D:\DHS data\NFHS 5\Men\wrtemp.dta"
duplicates report mv001 mv002 mv003 mv024
sort mv001 mv002 mv003 mv024
duplicates drop mv001 mv002 mv003 mv024, force
save, replace
clear
use "D:\DHS data\NFHS 5\Men\IAMR7BFL.DTA"
sort mv001 mv002 mv003 mv024
merge 1:1 mv001 mv002 mv003 mv024 using "D:\DHS data\NFHS 5\Men\wrtemp.dta"
save "D:\DHS data\NFHS 5\Men\wrmen.dta"
The number of observations in the couples file, as provided by NFHS-5, is 57,693, whereas my merged files have 57,923 observations. Where am I making an error? Any help/suggestions would be deeply appreciated.
Regards,
dcpathak
|
|
|
Re: Creating Couples' file from IR and MR datasets for India [message #25162 is a reply to message #25157] |
Thu, 08 September 2022 07:52 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
If you need to add variables to the CR file, it is best to just do an IR/CR merge for any new women's variables (sort both files by v024 v001 v002 v003) and an MR/CR merge for any new men's variables (sort both files by mv024 mv001 mv002 mv003). If you try to reconstruct the CR file from scratch it is likely that you will have problems. This is a more complicated merge than it may seem to be. In the standard CR file, women are only allowed to name one man with v034, but men can name multiple women with mv034_*. The same man may appear in multiple couples. Otherwise, there would be women who would not appear at all. How you handle polygamy is usually the reason for the kinds of discrepancies you describe. I think it would be easier just to do IR/CR and MR/CR merges, as I said. The first one would be 1:1 and the second one would be 1:m (but you can do such merges without specifying "1:1" etc. so long as you enter "keep if _merge==3").
|
|
|