Hi Liz,
Thank you for the response.
I have another challenge, I can't seem to be getting the total percentage (5.2%) for the second column Nurse/midwife/paramedic/FWV. Instead, my computation shows that about 16.3% of births were delivered by Nurse/midwife/paramedic/FWV.
Could you please tell me where I might be going wrong in the computation?
************************************************************ ************************************
The following Stata code is used to compute the variable for the second column of Table 9.7
gen nurse = 0
foreach xvar of varlist m3b m3d {
replace nurse=1 if `xvar'==1
}
**
svy: tab wealth nurse, percent format(%4.1f) row
Please find the full code below:
** BDHS 2007
clear all
use BDBR51FL, clear
***************************************************************************
** WEIGHT VARIABLE
gen weight = v005/1000000
**************************************************************************
** SURVEY SET
gen psu = v021
gen strata = v023
svyset psu [pw = weight], strata(strata)
**************************************************************************
// RENAME
rename v190 wealth
///////////////////////////////////////////////////////////////////////////
// GENERATING DEPENDENT VARIABLES
qui regr m3a m3b m3d m3f if v208 >0 & v208 !=. [pw=weight]
drop if e(sample)!=1
** Doctor
recode m3a (1=1) (else=0), gen(assisted_doctor)
label define assisted_doctor 0"No" 1"Yes"
label var assisted_doctor "Birth delivered by a doctor"
label val assisted_doctor assisted_doctor
svy: tab wealth assisted_doctor, percent format(%4.1f) row
** Nurse
cap drop nurse
gen nurse = 0
foreach xvar of varlist m3b m3d {
replace nurse=1 if `xvar'==1
}
**
svy: tab wealth nurse, percent format(%4.1f) row
********************************************************************************
** SKILLED BIRTH ATTENDANT
cap drop skilled_birth
gen skilled_birth = 0
label define skilled_birth 0"Unskilled" 1"Skilled"
label var skilled_birth "Birth delivered by skilled birth attendant"
label val skilled_birth skilled_birth
** SKILLED BIRTH ATTENDANTS RECODE
foreach xvar of varlist m3a m3b m3d m3f {
replace skilled_birth=1 if `xvar'==1
}
**
svy: tab wealth skilled_birth, percent format(%4.1f) row
*==============================================================================*