The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Quetions about calculating stunting rates in Stata
Re: Quetions about calculating stunting rates in Stata [message #262 is a reply to message #261] Thu, 04 April 2013 14:35 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3040
Registered: February 2013
Senior Member
Here is a response from one of our DHS Stata experts Tom Pullum, that should answer your questions.

Your problem is that you were using the BR file, but DHS uses the PR file for this and the other child nutrition indicators. The PR file includes hc70 for all children under five in the household. The BR file includes hw70 for children under five in the household whose mother was also in the household and was eligible for the survey of women. This is a subset of the children in the PR file.

If you open the BR file in Stata and copy the following lines into the command window, you will get what you were doing:

* Use the following on the 2007 Bangladesh BR file
* BDBR51FL.dta
codebook hw70
tab hw70 if hw70>9990,m
tab hw70 if hw70>9990,m nolabel
gen HAZ=hw70
replace HAZ=. if HAZ>=9996
histogram HAZ
gen stunted=.
replace stunted=0 if HAZ ~=.
replace stunted=1 if HAZ<-200
tab stunted
* 41.70% stunted (2210/5300)
* This number can be confirmed with a regression, no covariate.
* First without weights
regress stunted
* unweighted percent stunted is 41.70%
* Repeat the regression with weights
regress stunted [pweight=v005]
* weighted percent stunted is 42.96%


However, if you open the PR file and copy the following lines into the command window, you will replicate the number in the report and in Stat Compiler:

* Use the following on the 2007 Bangladesh PR file
* BDPR51FL.dta
codebook hc70
tab hc70 if hc70>9990,m
tab hc70 if hc70>9990,m nolabel
gen HAZ=hc70
replace HAZ=. if HAZ>=9996
histogram HAZ
gen stunted=.
replace stunted=0 if HAZ ~=.
replace stunted=1 if HAZ<-200
tab stunted
* 41.92% stunted (2320/5535)
* This number can be confirmed with a regression, no covariate.
* First without weights
regress stunted
* unweighted percent stunted is 41.92%
* Repeat the regression with weights
regress stunted [pweight=hv005]
* weighted percent stunted is 43.24%

I am using a trick that you may not be aware of, linear regression without a covariate, to get the means of hw70 and hc70, unweighted or weighted. A command such as "regress y" will given just the intercept, which will be the mean of y. "regress y [pweight=hv005]" will give the weighted mean of y. Here the y variable is binary, so the mean of y is the proportion with y=1, and if multiplied by 100 you get the percentage with y=1

Let me know if you have other questions.

Bridgette-DHS
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Next Birth After Abortion
Next Topic: standardization of age for states in stata
Goto Forum:
  


Current Time: Fri Apr 26 04:47:19 Coordinated Universal Time 2024