The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Creating two variable (SPA )
Creating two variable [message #23350] Thu, 26 August 2021 09:20 Go to previous message
rasel is currently offline  rasel
Messages: 2
Registered: August 2021
Member
Dear DHS,

I am working with the 2017/18 Haiti SPA survey and looking to create two variable -sterilization equipment (table A.3.1) and full blood count (table 3.7) using the footnotes and questionnaire. Unfortunately, I am not getting the % of the final report table.
My STATA code is:
gen wgt=facwt/1000000
*Sterilization equipment
gen steril=0
replace steril=1 if (q201==1 | q201==2) & ((q501a_03==1 & q501b_03==1) | (q501a_05==1 & q501b_05==1) | (q501a_06==1 & q501a_07==1 & q501b_07==1))
tab steril [iw=wgt]
*Full blood count
gen blcount=0
replace blcount=1 if ((q834==1 & q835==1) | (q802a_1==1 & q802b_1==1 & q802c_1==1))
tab blcount [iw=wgt]
Do I need to consider anything else? Would it be possible to get the codes of these variables? I would greatly appreciate any help with this matter.

Many thanks
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Creating some variables
Next Topic: SPA variables
Goto Forum:
  


Current Time: Fri Mar 29 05:08:36 Coordinated Universal Time 2024