The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » husbands to their wives
husbands to their wives [message #16299] Mon, 10 December 2018 10:13 Go to next message
memon_suma@yahoo.com
Messages: 15
Registered: April 2018
Member
Hi,
I am trying to asses the number of infant deaths experienced by women who ever had children in Pakistan. I need some determinants for my study of which husband's working status is also required as a control variable. I want to merge MR and IR file and use the code as follows;

use PKMR61FL.DTA, clear
rename mv001 v001
rename mv002 v002
rename mv003 v034
sort v001 v002 v034
keep v001 v002 v034 mv714
save mrir.dta, replace
use PKIR61FL.DTA
sort v001 v002 v034
merge m:1 v001 v002 v034 using mrir.dta

My women data has 13558 observations, but after executing the coded above it returns 13928 observations. The merge shows 2798 entries merged.
I am not being able to understand the process here. I mean I suppose the number of observations in the merged file to be the same as women's?
Please help!
Re: husbands to their wives [message #16308 is a reply to message #16299] Wed, 12 December 2018 13:23 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1671
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

You are talking about what DHS describes as a "couples" or "CR" file. This file is normally produced by DHS and then made available where you found the IR and MR files. However, this Pakistan survey does not include the variables required to match partners. For example, mv034_1, mv034_2, etc., are empty.

The husband's occupation is v704 in the IR file. You will have to search through the variables in the IR file to see whether the work-related variable you are thinking of is there. That will be the only way to get it, because the merge is impossible.

Re: husbands to their wives [message #16317 is a reply to message #16308] Thu, 13 December 2018 06:19 Go to previous messageGo to next message
memon_suma@yahoo.com
Messages: 15
Registered: April 2018
Member
I see. I will try and sort it out.
But I am also facing another problem with my analysis.
I have my dependent variable defined as the number of infant deaths occurring to women who ever had any births. It is a women level data (IR) file and I am intending to check determinants of these deaths.
I have very correctly made my dependent variable, but have a problem in defining independent variables. For example, my independent variable is preceding birth interval, or immunization status, or anything related to children has distinct entries for every kid. I am not sure how to use a separate variable for each kid, even averages don't seem to be a reliable option.
Can you help me in telling what should I do about it? Is merging a way out, or taking averages, or something else?

Re: husbands to their wives [message #16402 is a reply to message #16317] Tue, 08 January 2019 08:46 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1671
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

There are two issues here. The first issue is what you asked before, about linking husbands and wives. Your procedure, using v034, is based solely on the woman's specification of her husband. DHS normally requires that this specification also matches with the man's specification of his wife. The latter was not included in the men's survey in Pakistan, and that is the reason why a couples' file was not included among the standard recode files.

You can probably do a very good job of matching couples in Pakistan using just the woman's response, and your Stata lines do this correctly. However, the reason why you get few matches is that the men's questionnaire was only administered in a subsample of households. There are 13,558 women in the IR file but only 3,168 men in the MR file. Your procedure gives 2,798 matches. That's the best you can possibly do in terms of getting couples.

The second issue is how to get the number of infant deaths per woman. An infant death is given by b7<12 for each of the births in the birth history. The following lines will do this in Stata, after you have opened the IR file. You will want to relate the number of infant deaths to the number of births, which is v201.

rename b*_0* b*_*

local li=1
quietly while `li'<=20 {
gen infant_death_`li'=0
replace infant_death_`li'=1 if b7_`li'<12
local li=`li'+1
}

egen infant_deaths=rowtotal(infant_death_*)
tab infant_deaths


Previous Topic: Linking variables from SA 1998 HR, PR & IR files to Adult Health respondents
Next Topic: How to merge PR & CR files in R
Goto Forum:
  


Current Time: Mon Oct 14 02:28:56 Eastern Daylight Time 2019