The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Replicating table (Ethiopia SPA 2021-22)
Replicating table [message #28722] Thu, 29 February 2024 05:05 Go to previous message
foysal is currently offline  foysal
Messages: 9
Registered: August 2021
Member
Dear Sara and SPA experts,
I am trying to replicate table 3.7.1 of Ethiopia SPA 2021-22 report in Stata. I was unable to create some variables. My codes are:
gen wt=facwt/1000000

*X-ray machine
gen xray=0
replace xray=1 if ((q881b_1==1 & q881c_1==1) | (q881b_2==1 & q881c_2==1 & q881b_3==1))
tab xray [iw=wt]

*full blood count
gen blood_count=0
replace blood_count=1 if (q802a_1==1 & q802b_1==1 & q802c_1==1)
tab blood_count [iw=wt]

*Blood glucose
recode bloodgluc 9=.
recode bloodgluc (1=1 "available") (0=0 "not available"), gen (blood_glucose)
label variable blood_glucose "Blood glucose"
tab blood_glucose [iw=wt],m

*liver or renal function test
gen lrt=0
replace lrt =1 if q834==1 & q835==1
tab lrt [iw=wt]

It looks like I am using the correct variables according to the footnotes of the tables, but I am not getting the same % as the final report table. I want to get the same % of the report table.
I would greatly appreciate any help with this matter.
 
Read Message
Read Message
Previous Topic: Merging Nepal datasets (2015 and 2021_
Next Topic: Creating some variables
Goto Forum:
  


Current Time: Sun Nov 24 16:19:54 Coordinated Universal Time 2024