STATA recode for assistance during delivery SLDHS [message #11803] |
Fri, 10 February 2017 12:36 |
Mlue
Messages: 92 Registered: February 2017 Location: North West
|
Senior Member |
|
|
Hi there, I'm using the Sierra Leone DHS 2013 data. I have been trying to recode a variable that will give me the same results as in Table 9.6 and Figure 9.1 of SLDHS 2013.
Could someone please let me know how this variable (Assistance during delivery / Skilled birth attendant) is derived from DHS data using stata.
|
|
|
|
|
Re: STATA recode for assistance during delivery SLDHS [message #11843 is a reply to message #11804] |
Fri, 17 February 2017 02:56 |
Mlue
Messages: 92 Registered: February 2017 Location: North West
|
Senior Member |
|
|
HI Liz,
I figured it out... I was using the wrong dataset and wrong Stata commands/syntaxes.
*==================================================*
** DEMOGRAPHIC AND HEALTH SURVEY DATA
/*
A stata code (do file) to compute skilled birth attendant from DHS data
*/
********************************************************************************
*** YEAR = 2013
** SKILLED BIRTH ATTENDANTS (SBA)
********************************************************************************
** WEIGHT VARIABLE
gen weight = v005/1000000
********************************************************************************
** SURVEY SET
gen psu = v021
gen strata = v022
svyset psu [pw = weight], strata(strata) vce(linearized)
keep if v208 !=0 & v208 !=.
*==============================================================================*
** DROP IF NOT WITHIN SAMPLE
qui regr m3a m3b m3c if v208 >0 & v208 !=. [pw=weight]
drop if e(sample)!=1
**********************************
// RENAME
rename v190 wealth
rename v025 residence
rename v024 region
********************************************************************************
// GENERATING SKILLED BIRTH ATTENDANT - VARIABLE
gen skilled_birth = 0
label define skilled_birth 0"No" 1"Yes"
label var skilled_birth "Birth delivered by skilled birth attendant"
label val skilled_birth skilled_birth
** SKILLED BIRTH ATTENDANTS
foreach xvar of varlist m3a m3b m3c {
replace skilled_birth=1 if `xvar'==1
}
// CHECK - [Yes = Percentage delivered by a skilled provider]
svy: tab region skilled_birth, percent format(%4.1f) row
svy: tab region skilled_birth, count format(%4.0f) miss
*==============================================================================*
[Updated on: Fri, 17 February 2017 02:58] Report message to a moderator
|
|
|