The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Malaria Indicator Survey: Malaria outcomes and women's characteristics
Malaria Indicator Survey: Malaria outcomes and women's characteristics [message #8778] Thu, 17 December 2015 00:24 Go to next message
zachepa is currently offline  zachepa
Messages: 2
Registered: December 2015
Location: Malawi
Member

Hallo everyone,

I am using 2014 Malaria Indicator Survey (MIS) data (DTA, FL) for Malawi.

I would like to explore under-five malaria outcomes (hml32) vis-a-vis women's (or mothers') characteristics i.e. religion (v130) and access to malaria messages (s507).

I have successfully merged the MIS data files (MWIR71DT, MWPR71DT, MWKR71DT) using the following command "merge m:1 varlist using filename, generate(newvarl)"

However, when i tabulate malaria outcomes (hml32) and some women's characteristics (i.e. s507 or v130) I get the message "no observations".

Is there something I am not doing right? Kindly help.

Zachepa
Re: Malaria Indicator Survey: Malaria outcomes and women's characteristics [message #8930 is a reply to message #8778] Fri, 15 January 2016 10:49 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The three variables you want to combine are hml32, v130, and s507. The PR file includes everyone, adults and children; it includes hml32 but that variable is only for children under 5. The IR file has only women 15-49 and contains v130 and s507. The KR file has a record for each child under five, but the information for the mother is attached to each child's record. Therefore v130 and s507 are in the KR file, as well as the IR file. Therefore, to construct a file that includes hml32, v130, and s507, you only need to merge the PR and KR files. You do not need to include the IR file in this process.

When you do this merge you will be limited to children under five whose mother was in the household. That is, there are some children in the PR file who will not be in the KR file because their mother has died or for some other reason is not in the household. In the KR file, b16 is the line number of the child in the PR file. I see that for this survey there are only 56 such children. The final file has 2,022 children in it.

The following lines will do the merge. You must change the paths. If you have questions about it, you should be able to find answers in earlier postings.

use e:\DHS\DHS_data\KR_files\MWKR71FL.dta, clear
gen hv001=v001
gen hv002=v002
gen hvidx=b16
sort hv001 hv002 hvidx
save e:\DHS\DHS_data\scratch\temp.dta, replace

use e:\DHS\DHS_data\PR_files\MWPR71FL.dta, clear
sort hv001 hv002 hvidx
merge hv001 hv002 hvidx using e:\DHS\DHS_data\scratch\temp.dta
tab _merge
keep if _merge==3
drop _merge

tab1 hml32 v130 s507
Re: Malaria Indicator Survey: Malaria outcomes and women's characteristics [message #8936 is a reply to message #8778] Sat, 16 January 2016 07:20 Go to previous message
zachepa is currently offline  zachepa
Messages: 2
Registered: December 2015
Location: Malawi
Member

Thank you very much for your support. Your explanation is very clear.
Previous Topic: Duplicates in IR file when merging
Next Topic: Partners variables
Goto Forum:
  


Current Time: Mon Dec 23 14:40:46 Coordinated Universal Time 2024