The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Replicating table (SPA Survey)
Replicating table [message #29368] Fri, 07 June 2024 14:16 Go to next message
foysal is currently offline  foysal
Messages: 8
Registered: August 2021
Dear Sara and SPA experts,

I am currently working with the Nepal SPA Survey 2021 dataset and am attempting to create several variables from Table 3.8.2. Despite my efforts, I have been unable to match the percentages reported in the final survey report. Below is my STATA code:

gen wgt=facwt/1000000

*Any sterilization equipment
gen ster=0
replace ster=1 if (q201==1 | q201==2) & ((q501a_1==1 & q501b_1==1) | (q501a_3==1 & q501b_3==1) | (q501a_6==1))
tab ster [iw=wgt]

**Safe final disposal of sharp waste
recode sharpwaste 9=.
recode sharpwaste (1=1 "available") (0=0 "not available"), gen (swaste)
label variable swaste "Safe final disposal of infectious waste"
tab swaste [iw=wgt],m

**Safe final disposal of healthcare waste
recode medwaste 9=.
recode medwaste (1=1 "available") (0=0 "not available"), gen (mwaste)
label variable mwaste "Safe final disposal of infectious waste"
tab mwaste [iw=wgt],m

***Appropriate storage of healthcare waste
recode medstore 9=.
recode medstore (1=1 "available") (0=0 "not available"), gen (mstore)
label variable mstore "Appropriate storage of infectious waste"
tab mstore [iw=wgt],m

***IP and health care waste management guidelines
gen guide=0
replace guide=1 if q610==1 & q611==1
tab guide [iw=wgt]

***Appropriate storage of sharp waste
recode sharpstore 9=.
recode sharpstore (1=1 "available") (0=0 "not available"), gen (sstore)
label variable sstore "Appropriate storage of infectious waste"
tab sstore [iw=wgt],m

***Equipment for high level disinfection (HLD)
recode hldequip 9=.
recode hldequip (1=1 "available") (0=0 "not available"), gen (hilvldis)
label variable hlequip "Equipment for high level disinfection (HLD)"
tab hlequip [iw=wgt],m

Additionally, I have a query regarding the variable "Improved water source" in the Haiti SPA 2017-18 dataset. Here is the STATA code I used, but the percentages do not match the report (Table 3.3):
gen water=0
replace water=1 if inlist(q330,1,2,10) | (inlist(q330,3, 4, 5, 7, 9) & inlist(q331, 1, 2))
tab water [iw=wgt]
label var water "improved water source"
tab water [iw=wgt],m

Could you please provide guidance on the correct steps to create these variables? Specifically, I am interested in understanding the criteria and coding used to derive these variables to ensure they align with the percentages reported in the final documents.

Many thanks
Re: Replicating table [message #29414 is a reply to message #29368] Thu, 13 June 2024 06:52 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 737
Registered: April 2022
Senior Member
Following is a response from Senior Data Processing Specialist, Claudia Marchena:

Regarding Haiti SPA 2017-18 for "Improved water source":

Q330 in 1,2,10,12 or (Q330 in 3,4,5,7,9 & Q331 in 1,2)
Note from Claudia: category 12 in Q330 is included in the code. This country specific category was confirmed by the Implementing Agency as applicable. Unfortunately, it is missing in the footnote for table 3.3.

Regarding your question about Nepal SPA a response will be posted next week.
  • Attachment: image002.png
    (Size: 86.95KB, Downloaded 17 times)
Previous Topic: Replicating table
Goto Forum:

Current Time: Sun Jun 16 14:05:29 Coordinated Universal Time 2024