The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » merge IR MR AND PR (Hypertension in Côte d'Ivoire)
Re: merge IR MR AND PR [message #28997 is a reply to message #28989] Tue, 09 April 2024 07:35 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

When you merge using cluster, hh, and line, you can ignore the string id codes. The id codes should be omitted from the "sort" lines. (Also, hhid does not include the line number, but caseid does,)

When you include "1:1" in the merge statement, you do not have to sort the files. You could omit the "sort" lines entirely. You only need to sort if you omit "1:1" from the merge statement, for an older version of the sort command. (I used to use the older version but no longer do so.)

The PR file already includes BMI. You do not have to construct it from height and weight (ha2, ha3, hb2, hb3). BMI is ha40 for women and hb40 for men. You could combine them into a single variable, call it hab40, for example, with these two lines:

gen hab40=ha40 if hv104==2
replace hab40=hb40 if hv104==1

The IR file includes BMI as v445. The MR file should include BMI as mv445, but for some reason BMI does not appear in the MR file for this survey, with that name or any other. If you merge the MR and PR files, you can construct mv445 with "gen mv445=hb40".

Note that men were subsampled in this survey. Therefore, when you combine IR and MR data into a single file, you will need to weight up the men for any estimates of means, etc., for the combined population.

I cannot tell whether your primary goal is to have a single file of women and men that includes BMI, or something else. Please clarify, if you need more suggestions.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging children in IR with children in PR
Next Topic: IR and NR files
Goto Forum:
  


Current Time: Sun Nov 24 22:48:50 Coordinated Universal Time 2024