The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Malaria » Nigeria Malaria Indicator survey 2021
Re: Nigeria Malaria Indicator survey 2021 [message #27443 is a reply to message #27406] Tue, 15 August 2023 11:57 Go to previous messageGo to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 938
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

You need to do a merge, copying hv216 in the household data onto the data for the women. Below I will paste Stata lines that do this. This program will copy ALL the household-level variables, not just hv216.

* Stata program to copy household-level variables into the IR file

* Specify workspace
cd e:\DHS\DHS_data\scratch

* Prepare household data
use "...NGHR81FL.DTA" , clear
drop *_*
rename hv001 cluster
rename hv002 hh
sort cluster hh
save NGHR81_temp.dta, replace

* Prepare the IR file and merge
use "...NGIR81FL.DTA" , clear
rename v001 cluster
rename v002 hh
sort cluster hh
merge m:1 cluster hh using NGHR81_temp.dta
keep if _merge==3
drop _merge
 
Read Message
Read Message
Read Message
Previous Topic: Missingness in strata variables (Madagascar MIS- 2011 and 2013)
Next Topic: Gambia DHS 2019-20
Goto Forum:
  


Current Time: Wed Feb 19 21:23:13 Coordinated Universal Time 2025