Home » Topics » Service Provision Assessment (SPA) » Replicating table 3.3 and 3.7 in Tanzania SPA 2014-15 (2014-15 TSPA)
Re: Replicating table 3.3 and 3.7 in Tanzania SPA 2014-15 [message #23317 is a reply to message #23315] |
Mon, 23 August 2021 13:20 |
SaraDHS
Messages: 46 Registered: December 2020
|
Member |
|
|
Dear Shakim,
Below is the code to create these variables for Nepal. Please pay special attention to the titles and footnotes provided in these tables, as they provide descriptions for country-specific definitions of the variables. In most, but not all, of the cases, adapting the code to match the provided definition was all that needed to be done.
Best of luck,
Sara
*Regular electricity
gen elec=0
replace elec=1 if q340==1 & q341==1
replace elec=1 if regexm(q343, "A") & q345==1 & q346==1
replace elec=1 if regexm(q343, "B") & q345==1 & q346==1
replace elec=1 if regexm(q343, "C")
replace elec=1 if regexm(q343, "D") & q346b==1
tab elec [iw=wt],m
*Soap and running water or else alcohol-based hand disinfectant
gen swatrub=0
*In Nepal, methylated alcohol was included as an "alcohol-based hand disinfectant"
replace swatrub=1 if (q710_02==1 & q710_01==1) | q710_03==1 | q710_15==1
tab swatrub [iw=wt]
*In the title of Table 3.7.3, it states that this is among PHCCs and hospitals, so you need to limit each to only these types of facilities.
*Xray machine
gen xray=.
replace xray=0 if inrange(factype,1,7) | inrange(factype,12,14)
replace xr=1 if xray==0 & ((q881b_1==1 & q881c_1==1) | (q881b_2==1 & q881c_2==1 & q881b_3==1 & q881c_3==1))
tab xray [iw=wt]
*Full blood count
gen blood_count=.
replace blood_count=0 if inrange(factype,1,7) | inrange(factype,12,14)
replace blood_count=1 if blood_count==0 & ((q834==1 & q835==1) | (q802eb_1==1 & q802ec_1==1 & q802eb_2==1 & q802eb_3==1 & q802ec_3==1))
tab blood_count [iw=wt]
*Liver or renal function test
gen lrt=.
replace lrt=0 if inrange(factype,1,7) | inrange(factype,12,14)
replace lrt =1 if lrt==0 & q833==1 & ((q834==1 & q835==1) |(q835c==1 & q835d==1))
tab lrt [iw=wt]
Sara Riese, PhD
Senior Demographic and Health Researcher, DHS Program
|
|
|
Goto Forum:
Current Time: Wed Nov 13 20:36:57 Coordinated Universal Time 2024
|