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
 lexgw Messages: 31Registered: 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

 Replicating DHS tables on child health By: lexgw on Mon, 16 November 2015 19:00 Re: Replicating DHS tables on child health By: Trevor-DHS on Wed, 18 November 2015 01:17 Re: Replicating DHS tables on child health By: lexgw on Wed, 18 November 2015 07:41 Re: Replicating DHS tables on child health By: lexgw on Wed, 18 November 2015 18:47 Re: Replicating DHS tables on child health By: lexgw on Thu, 26 November 2015 17:46 Re: Replicating DHS tables on child health By: Trevor-DHS on Thu, 03 December 2015 11:55 Re: Replicating DHS tables on child health By: Trevor-DHS on Thu, 03 December 2015 11:58 Re: Replicating DHS tables on child health By: Trevor-DHS on Wed, 18 November 2015 19:05 Re: Replicating DHS tables on child health By: lexgw on Thu, 19 November 2015 09:32 Re: Replicating DHS tables on child health By: lexgw on Thu, 19 November 2015 20:07 Re: Replicating DHS tables on child health By: Trevor-DHS on Thu, 19 November 2015 23:06 Re: Replicating DHS tables on child health By: lexgw on Sat, 21 November 2015 05:55 Re: Replicating DHS tables on child health By: Trevor-DHS on Sat, 21 November 2015 15:13 Re: Replicating DHS tables on child health By: lexgw on Sat, 21 November 2015 21:12 Re: Replicating DHS tables on child health By: Trevor-DHS on Sun, 22 November 2015 17:59 Re: Replicating DHS tables on child health By: lexgw on Mon, 23 November 2015 09:22 Re: Replicating DHS tables on child health By: Trevor-DHS on Mon, 23 November 2015 10:50 Re: Replicating DHS tables on child health By: lexgw on Mon, 23 November 2015 10:56 Re: Replicating DHS tables on child health By: Trevor-DHS on Mon, 23 November 2015 10:58 Re: Replicating DHS tables on child health By: lexgw on Mon, 23 November 2015 11:00 Re: Replicating DHS tables on child health By: lexgw on Mon, 23 November 2015 11:05 Re: Replicating DHS tables on child health By: sammy nyarko on Sat, 10 December 2016 10:59 Re: Replicating DHS tables on child health By: sammy nyarko on Sun, 11 December 2016 03:47 Re: Replicating DHS tables on child health By: lexgw on Mon, 23 November 2015 11:16 Re: Replicating DHS tables on child health By: Trevor-DHS on Mon, 23 November 2015 11:19 Re: Replicating DHS tables on child health By: lexgw on Thu, 10 December 2015 08:35 Re: Replicating DHS tables on child health By: lexgw on Thu, 10 December 2015 09:23 Re: Merging By: lexgw on Thu, 04 August 2016 13:36 Re: Merging By: Trevor-DHS on Fri, 05 August 2016 18:13 Re: Merging By: lexgw on Fri, 05 August 2016 20:25
 Previous Topic: Homemade fluids and SSS for diarrhoea Next Topic: Number of under five children in the family
Goto Forum:

Current Time: Fri Apr 12 13:19:14 Coordinated Universal Time 2024