The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Food security measurement from Nepal DHS2011
Re: Food security measurement from Nepal DHS2011 [message #8254 is a reply to message #8248] Tue, 22 September 2015 10:48 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from our DHS Stata Specialist, Lindsay Mallick:

Here is the code that produces results which match the table in the final report:

gen fsecurity=1 if (sh130==0 | sh130==1) & sh131==0 & sh132==0 & sh133==0 & sh134==0 & sh135==0 & sh136==0
replace fsecurity=2 if (sh130==2 | sh130==3 | sh131==1 | sh131==2| sh131==3 | sh132==1) & sh133==0 & sh134==0 & sh135==0 & sh136==0
replace fsecurity=3 if (sh132==2 | sh132==3 | sh133==1 | sh133==2 | sh134==1 | sh134==2 ) & sh135==0 & sh136==0
replace fsecurity=4 if (sh133==3 | sh134==3 )| (sh135==1 | sh135==2 | sh135==3 | sh136==1 | sh136==2 | sh136==3)
tab fsecurity [iw=hv005/1000000]

The levels of food insecurity are mutually exclusive and not cumulative (as you appeared to have them coded in your post).

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to carry out Individual Meta-analysis of DH surveys in sub-Saharan Africa using Stata
Next Topic: Cluster level population density data (Geospatial Covariate Datasets)
Goto Forum:
  


Current Time: Wed Dec 18 11:14:33 Coordinated Universal Time 2024