The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » STATA code for replicating table 2.4 in BHFS 2017 (Bangladesh Health Facility Survey 2017 report weighted table)
Re: STATA code for replicating table 2.4 in BHFS 2017 [message #23035 is a reply to message #23032] Mon, 28 June 2021 13:36 Go to previous messageGo to previous message
Shireen-DHS is currently offline  Shireen-DHS
Messages: 140
Registered: August 2020
Location: USA
Senior Member
Hello,

To create the weight variable, you must divide the appropriate weight by 1 million. For table 2.4 you need the facility file. I am using BDFC7IFLSP.dta for the 2017 Health Facility Survey.

*generate weight variable for facility file
gen wt=facwt/1000000

*Table 2.4

*weighted
tab factype [iw=wt]
tab ftype [iw=wt]
tab region [iw=wt]

*to get unweighted, you must first drop the facilities that have no weight
drop if wt==.
tab factype
tab ftype
tab region

You can use the facility weight for other tables in the report reported at the facility level such as table 3.2
For Table 3.2 you need to code the facilities that offer the services. I show you two examples. You would need to look at question 102 in the questionnaire to know which service is offered and you also need to checked the service specific sections for instance question 1201 for child curative care and question 1401 for ANC. You can do the same for the other services.


*Table 3.2
*Child curative care
gen childfacil = 0
replace childfacil=1 if (q102_03==1 & inrange(q1201a,1,31))
tab childfacil [iw=wt]

*ANC services
gen ancfacil =0
replace ancfacil=1 if (q102_05==1 & inrange(q1401,1,31))
tab ancfacil [iw=wt]

Hope this answers your question.

Best,
Shireen Assaf
The DHS Program
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: SPA facility sampling frame access
Next Topic: Question about variables starting with "q" and "c"
Goto Forum:
  


Current Time: Thu Dec 12 12:42:31 Coordinated Universal Time 2024