The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Service Provision Assessment (SPA) » Creating two variable (SPA )
Re: Creating two variable [message #23369 is a reply to message #23350] Mon, 30 August 2021 08:31 Go to previous messageGo to previous message
SaraDHS is currently offline  SaraDHS
Messages: 44
Registered: December 2020
Member
Dear rasel,

Please pay attention to the way variables are named in the dataset. For example here, in your code for full blood count, you are using q802a_1, however, in the Haiti dataset, that variable should be q802a_01. In addition, in Haiti the only criterion for this variable is the hematology analyzer, although this was not included in the footnotes. You can remove the part of your code about the blood chemistry analyser, and you should get the same % as in the final report.

For sterilization, the definition is not clear from the footnotes, so here is the appropriate code:

replace steril=1 if (q201==1 | q201==2) & ((q501a_04==1 & q501b_04==1) | (q501a_01==1 & q501b_01==1) | (q501a_02==1 & q501b_02==1 & q501a_07==1 & q501b_07==1))

For most countries, if you compare final report table footnotes, the dataset, and the variable names, you should be able to recreate the variables to match the final report %.

Best of luck,
Sara


Sara Riese, PhD Senior Demographic and Health Researcher, DHS Program
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Creating some variables
Next Topic: SPA variables
Goto Forum:
  


Current Time: Mon Apr 29 06:52:42 Coordinated Universal Time 2024