The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Replicating DHS tables on child health
Re: Replicating DHS tables on child health [message #8635 is a reply to message #8633] Mon, 23 November 2015 11:05 Go to previous messageGo to previous message
lexgw is currently offline  lexgw
Messages: 31
Registered: October 2015
Location: United Kingdom
Member

Sorry I sent you something I was changing but this is what I meant to send you;

clear
use "C:\Users\Gabriel\Desktop\DHS\DHS 2011\data\UGPR6052FL.DTA"
log using anthropometric.log, replace

gen wgt=hv005/1000000

egen strata = group(hv024 hv025)
replace hv022 = strata
replace hv023 = strata
svyset[pw=wgt], psu(hv021) strata(hv022) singleunit(centered)

*Height for age
gen hbel_minus3=0
replace hbel_minus3=1 if hc70<-300 & hc13==0
gen hbel_minus2=0
replace hbel_minus2=1 if hc70<-200 & hc13==0


recode hc1 (0/5=1 "<6")(6/8=2 "6-8")(9/11=3 "9-11")(12/17=4 "12-17")(18/23=5 "18-23")(24/35=6 "24-35")(36/47=7 "36-47")(48/59=8 "48-59")if hv120==1 & hv103==1, gen (age_months2)
svy: tab age_months2 hbel_minus3 if survey==1 & hv103==1 & hc70<9996, row
svy: tab age_months2 hbel_minus2 if survey==1 & hv103==1 & hc70<9996, row
svy: mean hc70 if hc70<9996 & hc13==0, over(age_months2)
svy: mean hc70
if hc70<9996 & hc13==0, over(hc27)
tab age_months2 hbel_minus2 if survey==1 & hv103==1 & hc70<9996 [iw=wgt]

log close

Sorry this is what I am running in stata
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Homemade fluids and SSS for diarrhoea
Next Topic: Number of under five children in the family
Goto Forum:
  


Current Time: Wed Apr 17 20:36:17 Coordinated Universal Time 2024