The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Creating some variables (SPA)
Re: Creating some variables [message #23375 is a reply to message #23342] Tue, 31 August 2021 02:23 Go to previous messageGo to previous message
ashraf is currently offline  ashraf
Messages: 3
Registered: August 2021
Member
Dear Sara,
Thanks for your response. According to the footnotes, and questionnaire I have tried with the following code to create variable "equipment for high level disinfection" of table 3.5 in Afghanistan SPA 2018-19.
gen wgt=facwt/1000000
gen hlvlds=0
replace hlvlds=1 if (q201==1 | q201==2) & ((q501a_3==1 & q501b_3==1) | (q501a_5==1 & q501b_5==1) | (q501a_6==1) | inrange (q502g_5,3,5))
tab hlvlds [iw=wgt]

Unfortunately, I am not getting the % as of the table. Please help me to create this variable.

Regards,
Ashraf
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Replicating table 3.3 and 3.7 in Tanzania SPA 2014-15
Next Topic: Creating two variable
Goto Forum:
  


Current Time: Thu Oct 10 07:22:32 Coordinated Universal Time 2024