The DHS Program User Forum
Discussions regarding The DHS Program data and results
Today's Messages (on)  | Unanswered Messages (off)

Forum: Ethiopia
 Topic: Special shifting
Re: Special shifting [message #29165 is a reply to message #29153] Thu, 02 May 2024 08:20
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3048
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff members, Tom Pullum and Rose Donohue:

We are not familiar with the term "special shifting". Perhaps you meant "spatial shifting"? If you are referring to the displacement of cluster locations, that is the same for every country and survey. SAR7 describes the displacement procedure.

The only raster datasets we produce are the modeled surfaces. You cannot merge raster data with DHS recode files, though you could extract the values of the raster data at the cluster locations (from the GE dataset) using a GIS software. The specific steps would vary depending on the software that is being used. The general steps though are included in the DHS covariate manual ( https://spatialdata.dhsprogram.com/references/DHS_Covariates _Extract_Data_Description_2.pdf), as we extract values from different raster datasets at the cluster locations to produce the GC files.

Forum: India
 Topic: Blood Pressure and Glucose Variables - India
Blood Pressure and Glucose Variables - India [message #29168] Thu, 02 May 2024 18:05
krittika03 is currently offline  krittika03
Messages: 7
Registered: March 2024
Member
Hi, I am wondering about which variable will be appropriate to use for using high blood pressure and high glucose as health outcome of individual? I am working with NHFS 5 India dataset. One of the variable asks for (sb20 on IR file) 'high BP on two or more occasions by doctors' and one is just (s728b) "currently has hypertension". Since the numbers are differently reported and don't match, to use it as a population's health outcome, which variable will give more justified results? Same for diabetes/glucose level. Thank you!
Forum: Dataset use in Stata
 Topic: Strange Issues w/ Data Formatting from DHS
Re: Strange Issues w/ Data Formatting from DHS [message #29166 is a reply to message #29033] Thu, 02 May 2024 08:46
tednoel is currently offline  tednoel
Messages: 8
Registered: April 2024
Member
Hi Trevor, I fixed this line of code- thank you so much. Unfortunately, there is still an error cropping up with respect to the hhid case identifier. Below is the lines of code concerned:

use TZWI41FL.dta
sort whhid
save TZWI41FL.dta, replace

use TZPR41FL.dta, clear
* keep the variables you want from the PR file
clonevar whhid = hhid
keep hhid hv005 hv007 hv025 hv219
sort hhid
merge m:1 hhid using TZWI41FL.dta
clonevar v001 = hv001
clonevar v002 = hv002
clonevar v003 = hvidx
sort v001 v002 v003
save TZPR41FL_temp.dta

use TZIR41FL.dta, clear
sort v001 v002 v003
merge 1:1 v001 v002 v003 using TZPR41FL_temp.dta


Unfortunately, it seems like the wealth index cannot be emrged using either "hhid" or "whhid," as I've received error messages for both iterations of this code (attached in photos). I've been trying to figure out what the issue is and perhaps I shouldn't be using the command "clonevar" and perhaps I should just be renaming the variable entirely? I want to make sure that this is correct.

As always, really grateful for your assistance!
Re: Strange Issues w/ Data Formatting from DHS [message #29167 is a reply to message #29166] Thu, 02 May 2024 10:03
Trevor-DHS is currently offline  Trevor-DHS
Messages: 793
Registered: January 2013
Senior Member
Hi
The problem is that hhid does not exist in the WI file, but whhid does. You had the right idea when you created whhid in the PR data using the clonevar statement, but then you dropped it immediately by not including it in the keep statement. So you need to include whhid in the keep statement and then use it in the next few statements as follows:
use TZPR41FL.dta, clear
* keep the variables you want from the PR file
clonevar whhid = hhid
keep whhid hhid hv005 hv007 hv025 hv219
sort whhid
merge m:1 whhid using TZWI41FL.dta
Re: Strange Issues w/ Data Formatting from DHS [message #29169 is a reply to message #29033] Thu, 02 May 2024 18:12
tednoel is currently offline  tednoel
Messages: 8
Registered: April 2024
Member
Hi Trevor, once more, thank you a million times over for the guidance. The importance of the 'keep' statement had slipped my mind! The WI and PR data set combined perfectly, and I'm almost there, but of course another last minute problem has cropped up when trying to combine everything with the IR dataset. Here I've been stuck on a somewhat bizarre issue for the past couple of hours. STATA is insisting when I try and do the last merge that the "variable _merge is already defined." I'm aware that when STATA performs merges it might save the merge as a variable so I attempted to drop the merge command and then rerun the merge but when I try and drop the "_merge" it tells me that this variable doesn't exist. However, when I try to rerun the merge it then tells me once more that the variable is already defined. I'm attaching a screenshot here so you can see what the problem looks like in STATA. You've been of such incredible help so far so I figured I'd ask because maybe this is a problem others have had as well? It's unusual but I know you've seen so much with respect to the issues that might crop up with DHS data in STATA. As always, thank you so much in advance for any guidance you might be able to provide <3



Current Time: Thu May 2 19:02:52 Coordinated Universal Time 2024