The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Replicating Table (Bangladesh SPA 2017)
Replicating Table [message #24710] Mon, 27 June 2022 12:31 Go to next message
shakim is currently offline  shakim
Messages: 10
Registered: January 2021
Dear DHS experts,

I am trying to replicate some variables in table 3.8.1 from Bangladesh SPA 2017 in Stata. My code is:

*1. Amitriptyline
gen ami=0
replace ami=1 if q903_01==1

*2. Amoxicillin
gen amoxi=0
replace amoxi=1 if q901_01==1

*3. Atenolol
gen aten=0
replace aten=1 if q903_03==1

*4. Captopril
gen capt=0
replace capt=1 if q903_06==1

*5. Ceftriaxone
gen ceft=0
replace ceft=1 if q901_09==1

*6. Ciprofloxacin
gen cipro=0
replace cipro=1 if q901_10==1

*7. Cotrimoxazole
gen cotrim=0
replace cotrim=1 if q901_12==1

*8. Diazepam
gen diaz=0
replace diaz=1 if q903_08==1

*9. Diclofenac
gen diclon=0
replace diclon=1 if q908_01==1

*10. Glibenclamide
gen gliben=0
replace gliben=1 if q903_14==1

*11. Omeprazole
gen omep=0
replace omep=1 if q903_22==1

*12. Paracetamol
gen para=0
replace para=1 if q908_03==1

*13. Salbutamol inhaler
gen sal=0
replace sal=1 if q903_24==1

According to the questionnaire, I appear to be looking at the correct variables, but I'm not getting the percentages as shown in the table of the report. Is there anything else I should think about? Any assistance in this regard would be highly appreciated.

Many thanks
Re: Replicating Table [message #24724 is a reply to message #24710] Tue, 28 June 2022 15:46 Go to previous message
SaraDHS is currently offline  SaraDHS
Messages: 44
Registered: December 2020
Hi Shakim,
You have calculated the variables correctly, you just need to tabulate the variables using the facility weight. You can scale the existing facwt variable in the dataset by using

gen fwt=facwt/1000000

then if you use that as your analytical weight in the tabulation, for example:

tab ami [aw=fwt]

In this way, you will be able to replicate the results in Table 3.8.1

Best of luck!

Sara Riese, PhD Senior Demographic and Health Researcher, DHS Program
Previous Topic: sick child observations/visits
Next Topic: SPA survey
Goto Forum:

Current Time: Sun Jul 21 03:23:06 Coordinated Universal Time 2024