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

Forum: General
 Topic: DISABILITY - UGANDA DHS 2016
DISABILITY - UGANDA DHS 2016 [message #16706] Fri, 22 February 2019 07:19
Mlue
Messages: 57
Registered: February 2017
Location: Cape Town
Senior Member
To whom it may concern.

A Stata do file to match figures on disability (Washington Group questions) in the Uganda DHS 2016 report.

clear all
set maxvar 9000
set mem 1g
cd "C:\Users\Dubile\Documents\UGANDA DHS 2016\UG_2016_DHS_02212019_82_52565\UGPR7ADT"
use "UGPR7AFL", clear
set more off

** ========================================================================== **
** WEIGHT VARIABLE
gen weight = hv005/1000000

** ========================================================================== **

** SURVEY SET
gen psu =    hv021
gen strata = hv023

svyset psu [pw = weight], strata(strata) vce(linearized)

** ========================================================================== **

sort hhid hvidx

* Generate "pid"
by hhid: gen pid = _n

* Creating household size
by hhid: generate hhsize=_N

egen hhtag = tag(hhid)

*br hhid hvidx pid hhsize hhtag

** ========================================================================== **
cap drop Seeing
gen Seeing =9 if sh24 == 9 | sh25 == 9
replace Seeing = 1 if sh24 == 1 | sh25 == 1
replace Seeing = 2 if sh24 == 2 | sh25 == 2
replace Seeing = 3 if sh24 == 3 | sh25 == 3
replace Seeing = 4 if sh24 == 4 | sh25 == 4
replace Seeing = 8 if sh24 == 8 | sh25 == 8

cap drop Hearing
gen Hearing =9 if sh27 == 9 | sh28 == 9
replace Hearing = 1 if sh27 == 1 | sh28 == 1
replace Hearing = 2 if sh27 == 2 | sh28 == 2
replace Hearing = 3 if sh27 == 3 | sh28 == 3
replace Hearing = 4 if sh27 == 4 | sh28 == 4
replace Hearing = 8 if sh27 == 8 | sh28 == 8

** RENAME VARIABLES **
rename sh29 Communicate
rename sh30 Remembering
rename sh31 Walking
rename sh32 Selfcare

** REPLACE **
replace Seeing 		= 8 if Seeing == .
replace Hearing 	= 8 if Hearing == .
replace Communicate = 8 if Communicate == .
replace Remembering = 8 if Remembering == .
replace Walking 	= 8 if Walking == .
replace Selfcare 	= 8 if Selfcare == .

** ========================================================================== **

global disa2 "Seeing Hearing Communicate Walking Remembering Selfcare"

gen	disab		=	0
gen	sevdisab	=	0
gen	undisab1	=	0
gen	undisab2	=	0
gen	undisab		=	0
gen	discount	=	0
gen	donotknow	=	0

foreach xvar in $disa2 {
	replace	disab	=	1 if `xvar'>=3 & `xvar'<=4
	replace	sevdisab	=	1 if `xvar'>=3 & `xvar'<=4
}
*

foreach xvar in $disa2 {
	replace	undisab2	=	1 if `xvar'>=3 & `xvar'<=4
}
*

quietly forval q = 1/6 {
	egen temper = anycount($disa2) if `q' !=., values(9)
	replace discount = temper
    drop temper
}
*

quietly forval v = 1/6 {
	egen tempers = anycount($disa2) if `v' !=., values(8)
	replace donotknow = tempers
    drop tempers
}
*

quietly forval s = 1/6 {
	egen new_temp = anycount($disa2) if `s' !=., values(4)
	replace undisab1 = new_temp
    drop new_temp
}
*
replace	undisab	=	1	if	undisab1 > 1
replace	undisab	=	1	if	undisab2 == 1

foreach xvar in discount {
	replace	undisab		=	9 if `xvar' == 6
	replace	disab		=	9 if `xvar' == 6
	replace	sevdisab	=	9 if `xvar' == 6
}
*

foreach xvar in donotknow {
	replace	undisab		=	8 if `xvar' == 6
	replace	disab		=	8 if `xvar' == 6
	replace	sevdisab	=	8 if `xvar' == 6
}
*

** ========================================================================== **

** DISABILITY INDEX

gen Ungandadisab = undisab
replace Ungandadisab = 0 if undisab == 8
label var Ungandadisab "Washington Group recommended disability index"
label define Ungandadisab 0"Without disability" 1"With disability" 9"DNK/Unspecified"
label val Ungandadisab Ungandadisab

drop disab sevdisab undisab undisab1 undisab2 discount donotknow

** ========================================================================== **

recode hv105 (0/4=1 "0-4") (5/9=2 "5-9") (10/14=3 "10-14") (15/19=4 "15-19") ///
(20/24=5 "20-24") (25/29=6 "25-29") (30/34=7 "30-34") (35/39=8 "35-39") ///
(40/44=9 "40-44") (45/49=10 "45-49") (50/54=11 "50-54") (55/59=12 "55-59") ///
(60/64=13 "60-64") (65/69=14 "65-69") (70/74=15 "70-74") (75/79=16 "75-79") ///
(80/95=17 "80+") (98=18 "DNK"), gen(Age_5year_Groups)
label var Age_5year_Groups "Age in five-year age groups"
label val Age_5year_Groups Age_5year_Groups

recode hv105 (0/4=1 "0-4") (5/9=2 "5-9") (10/14=3 "10-14") (15/19=4 "15-19") ///
(20/29=5 "20-29") (30/39=6 "30-39") (40/49=7 "40-49") (50/59=8 "50-59") ///
(60/95=9 "60+") (98=10 "DNK"), gen(Agegroup)
label var Agegroup "Age groups"
label val Agegroup Agegroup

** ========================================================================== **

** DROP IF NOT WITHIN SAMPLE
qui regr Ungandadisab if hv103==1 & (hv105 >=5) & Ungandadisab !=9 [pw=weight]		
drop if e(sample)!=1

** ========================================================================== **
** CHECK **
svy: tab Agegroup Ungandadisab, percent format(%11.1f) row
svy: tab Agegroup Ungandadisab, count format(%11.0f) miss
svy: tab Agegroup Ungandadisab if hv105 >=15 & hv105 <98, percent format(%11.1f) row

** ========================================================================== **
** ========================================================================== **
** ========================================================================== **

** Table 2.15 Disability among adults by background characteristics  **
recode hv115 (.=9)

/* WOMEN */
svy: tab Agegroup Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row
svy: tab hv115 Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row
svy: tab hv025 Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row
svy: tab hv024 Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row
svy: tab hv106 Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row
svy: tab hv270 Ungandadisab if hv105 >=15 & hv104==2, percent format(%11.1f) row

***********************

/* MEN */
svy: tab Agegroup Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row
svy: tab hv115 Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row
svy: tab hv025 Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row
svy: tab hv024 Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row
svy: tab hv106 Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row
svy: tab hv270 Ungandadisab if hv105 >=15 & hv104==1, percent format(%11.1f) row

** ========================================================================== **
** =================================== END ================================== **
** ========================================================================== **

*svy: tab Age_5year_Groups Ungandadisab, percent format(%11.1f) row
*svy: tab Age_5year_Groups Ungandadisab, count format(%11.0f) miss

ssc install splitvallabels, replace //Need internet connection

splitvallabels Ungandadisab
graph hbar [aw=weight], ///
over(Ungandadisab, label(labsize(small)) relabel(`r(relabel)')) ///
ytitle("Percent of respondents", size(small)) ///
title("Disability status" ///
, span size(medium)) ///
blabel(bar, format(%4.1f)) ///
intensity(25)

splitvallabels Ungandadisab
graph hbar (count) [pw=weight], ///
over(Ungandadisab, label(labsize(small)) relabel(`r(relabel)')) ///
ytitle("Number of respondents", size(small)) ///
title("Disability status" ///
, span size(medium)) ///
blabel(bar, format(%4.0f)) ///
intensity(25)

exit

Forum: India
 Topic: HIV 2015 dataset and weight
Re: HIV 2015 dataset and weight [message #16705 is a reply to message #16675] Fri, 22 February 2019 07:19
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1549
Registered: February 2013
Senior Member

Following is a response from Senior Data Processing Specialist, Mianmian Yu:

Below is my response after checking with Mahmoud. Feel free to edit it when necessary.


Thank you for the questions.

1. HIV05 for NHFS-4 (2015-16) India survey is the national level weight. We don't have state level weight for this survey.
2. SV005 is the state-level women's weight for NHFS-4 (2015-16) India survey. Please note that we just discovered a typo in this variable's label, which should be corrected as "State women's sample weight". We will make this modification in the near future.

Please feel free to let us know if there are any other questions.
 Topic: Mismatch between National report and NFHS4 raw data analysis
Re: Mismatch between National report and NFHS4 raw data analysis [message #16707 is a reply to message #16694] Fri, 22 February 2019 08:27
Muneer Kalliyil is currently offline  Muneer Kalliyil
Messages: 13
Registered: November 2018
Member
Dear fredarnold,

As there are two different weights for the country and state, is there any third weight for district analysis in case of India. If not, what should we do, should we apply state weight or do without any weight.

Looking forward to hearing from you

Thanks
Re: Mismatch between National report and NFHS4 raw data analysis [message #16708 is a reply to message #16707] Fri, 22 February 2019 09:00
fredarnold is currently offline  fredarnold
Messages: 33
Registered: March 2014
Member
For district level, or any sub-domain, either national weights or state weights can be used. Both will result in the same indicator values but not the same weighted N's. The national weights can be used for any analysis. The state weights can be used for data analysis on the state or lower levels.

Re: Mismatch between National report and NFHS4 raw data analysis [message #16709 is a reply to message #16708] Fri, 22 February 2019 09:57
Muneer Kalliyil is currently offline  Muneer Kalliyil
Messages: 13
Registered: November 2018
Member
Thanks
 Topic: Need Clarification: DV weight
Need Clarification: DV weight [message #16710] Fri, 22 February 2019 12:25
Jasminc is currently offline  Jasminc
Messages: 3
Registered: January 2019
Member

We are trying to find prevalence of IPV in Couples Data (CR dataset) in India from 2005 and 2015 dataset.
We used D005 (domestic violence weight) and divided by 1000000. When we ran the analyses, the number of weighted observations was SMALLER than the number of observations (unweighted).
In order to generate nationally represented estimate for IPV, what do we do for D005? Do we still divide it by 1 million or smaller number?

Thank you,
Jasmin
 Topic: Multilevel modeling in DHS-Sri Lanka
Re: Multilevel modeling in DHS-Sri Lanka [message #16711 is a reply to message #16652] Fri, 22 February 2019 13:37
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1549
Registered: February 2013
Senior Member

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

Decisions such as this are at the discretion of the researcher, and can vary from one country to another, and are not something for which we maintain a rule book. The adjustment for clustering by PSU basically comes from the survey design. We always recommend including that adjustment in svyset, which is equivalent to including it as level 2 in a hierarchical model. I am surprised that the ICC is so low in this survey.

You could look at this as an empirical matter, I suppose, and let either the mother or the household be the level 2 unit if they have a higher ICC than the PSU does. Ideally, or conceptually, I think of a hierarchy of children/mothers/households/PSUs, and, but (a) methods to include all levels are complex and (b) the impact, which is limited to the standard errors of the coefficients, can be small.

So yes, in my opinion at least, if you find a higher ICC at the level of the mother or the household than at the level of the PSU, and you are limited to a two-level model, you would be justified in placing level 2 where it would have the largest effect.

Also there is a cumulative nature to these effects. For example, if you include a mother-level adjustment, you will definitely account for most of a household-level ICC and possibly for most of a PSU-level ICC.

Forum: Dataset use in SPSS
 Topic: Postnatal care utilization variable in 2015-2016 MDHS dataset
Re: Postnatal care utilization variable in 2015-2016 MDHS dataset [message #16712 is a reply to message #16640] Fri, 22 February 2019 13:57
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1549
Registered: February 2013
Senior Member
Following is a response from DHS Senior Research Associate, Lindsay Mallick:

I don't use SPSS, but here is some Stata code that may help. Yes, you must restrict to births in the last two years. This indicator also requires using 7 separate variables to construct it. You must combine responses from women who delivered in a facility and women who delivered at home, or who had a PNC check after returning home from the facility. You must also consider the provider of PNC when calculating this indicator.

Forum: General Data Questions
 Topic: Where is the original questionnaire?
Re: Where is the original questionnaire? [message #16713 is a reply to message #16656] Fri, 22 February 2019 14:06
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1549
Registered: February 2013
Senior Member
You are working with a standard recode data, and as a result, the numbers in the questionnaires will not match the variable names in the datasets. In order for the datasets to be as similar as possible across all surveys, DHS generates "standard recode" datasets, which contain the same data as the raw datasets, but in a standardized format. In the "standard recode" datasets, the variable names and definitions are, wherever possible, consistent across all surveys. However, each survey is different, with questions that diverge from the standard. These questions are included in the standard recode datasets, either as computed standard variables or as variables that are specific to that survey. For country specific questions, the variables are generally named and coded in the same way as they were on the questionnaire. The variable will have a leading "SH" if the question was asked at the household level, a leading "S" if asked at the women's level, and a leading "SM" if asked at the men's level. The process of recoding involves consistency checking and comparisons between the standard recode and raw datasets.

The questionnaire can be found in the appendix of the final report. For more information, please reference the description of the recode data in the recode manual, the step-by-step introduction to analyzing DHS data, the Data Tools and Manuals, and the country specific documentation within the .zip file you downloaded.
Forum: Bangladesh
 Topic: Missing STATA secondhand smoke exposure data
Re: Missing STATA secondhand smoke exposure data [message #16714 is a reply to message #16691] Fri, 22 February 2019 14:28
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1549
Registered: February 2013
Senior Member
Are you sure you are using the correct file? It should be BDHR61FL.DTA. See the frequency below on that file.


/index.php?t=getfile&id=1136&private=0
  • Attachment: hv252.PNG
    (Size: 27.00KB, Downloaded 4 times)

[Updated on: Fri, 22 February 2019 14:29]

Report message to a moderator

Forum: Unmet Need
 Topic: Getting Unmet Need & Demand Satisfied Estimates to Match StatCompiler for 5 Different Surveys
Re: Getting Unmet Need & Demand Satisfied Estimates to Match StatCompiler for 5 Different Surveys [message #16715 is a reply to message #16682] Fri, 22 February 2019 15:15
cgreenba is currently offline  cgreenba
Messages: 15
Registered: October 2017
Member
Hi Trevor and all,

I just wanted to give you an update on this email and let you know that I found the discrepancy and why I was unable to match the demand satisfied by modern methods estimates in StatCompiler for Niger 2006. In the v313 and v364 variables, women using LAM were classified as using traditional and NOT modern methods. This is the only survey (DHS IV or later) I looked at for which this was the case. However, in the demand satisfied by modern methods estimate, in order to match the estimate in StatCompiler, LAM needs to be counted in the numerator as a woman having her demand satisfied by a modern method.

I just thought that I would point this out. I'm glad to have resolved the difference!

Thank you!

Best,
Charlotte
Re: Getting Unmet Need & Demand Satisfied Estimates to Match StatCompiler for 5 Different Surveys [message #16716 is a reply to message #16715] Fri, 22 February 2019 15:20
Trevor-DHS is currently offline  Trevor-DHS
Messages: 638
Registered: January 2013
Senior Member
Hi Charlotte

I was trying to figure out the difference. I should have thought of that. There are a few surveys in which LAM was categorized as traditional rather than modern at the time of the survey, but they are all older ones. I'm glad you found it.

Thanks. Trevor



Current Time: Fri Feb 22 16:27:56 Eastern Standard Time 2019