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
Quetions about calculating stunting rates in Stata [message #261] Thu, 04 April 2013 14:33 Go to next message
DHS user is currently offline  DHS user
Messages: 100
Registered: February 2013
Senior Member
recently I've just got another issue on calculating the stunting rates (WHO reference) in STATA - I can't get the exact number as in DHS reports (my results are about 1 less)...Would you please suggest someone that can help with this?

My way to identify stunted children is like his:

keep if hw70<9996

*number of observations will be the denominator

gen stunting=hw70<-200

*number of stunted children will be the numerator

I'm aware that I'm not considering the sample weight here - so that's probably why the number is not right...Would you give me some suggestions on how to do this? Also I wonder did you use hw70<-200 or <=-200?

I am working with the Bangladesh 2007 children's recode - I got the stunting rate as 41.7% (2210/5300) whereas the number from the DHS STATcompiler is 43.2...

Thanks so much for your help and look forward to hearing from you.
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 next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1748
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
Re: Quetions about calculating stunting rates in Stata [message #14991 is a reply to message #262] Thu, 24 May 2018 05:57 Go to previous messageGo to next message
sadya2018@gmail.com
Messages: 98
Registered: April 2018
Location: Ethiopia, in Africa
Senior Member
Thank you Dr.Tom Pullum,Bridgette!!

Hassen Ali Hamza (BSc in Public Health,Master of Public Health Candidate)
Re: Quetions about calculating stunting rates in Stata [message #18545 is a reply to message #14991] Fri, 20 December 2019 12:22 Go to previous messageGo to next message
Sheela is currently offline  Sheela
Messages: 3
Registered: December 2019
Member
I am also having trouble getting my data to match what is shown in a DHS Final Report. I am calculating stunting using the Peru 2012 DHS in Stata.

The Peru 2012 DHS Final Report says that 18.1% of children under five were stunted (HAZ<-2.0), out of a denominator of 9168 children.

I am using the PE_2012_ContinuousDHS data and have not been able to get this same estimate. I have tried using both the KR and the PR data files, but neither gives me a denominator of 9168 children. Using the PR data file and the code provided above, I get a denominator of 9957 children. Using the KR data file, I get a denominator of 9334 children. (I understand that these files include different numbers of children based on their biological relationship to the main survey respondent, so I understand why they would give me different denominators, but I am confused about why I am not getting the denominator listed in the Final Report.)

I have watched the YouTube video series on Matching DHS Final Report Tables, but am still having the same problem. I would appreciate any insights into why I am getting a different denominator and what I may be doing wrong. Thank you!
Re: Quetions about calculating stunting rates in Stata [message #18617 is a reply to message #18545] Mon, 13 January 2020 09:22 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1748
Registered: February 2013
Senior Member
Following is a response from DHS Senior Analysis & Research Manager, Shireen Assaf:


The Stata code below will match the table shown in the final report. Please use the PR file.

gen wt=hv005/1000000

//Severely stunted
gen nt_ch_sev_stunt= 0 if hv103==1
replace nt_ch_sev_stunt=. if hc70>=9996
replace nt_ch_sev_stunt=1 if hc70<-300 & hv103==1 
label var nt_ch_sev_stunt "Severely stunted child under 5 years"

//Stunted
gen nt_ch_stunt= 0 if hv103==1
replace nt_ch_stunt=. if hc70>=9996
replace nt_ch_stunt=1 if hc70<-200 & hv103==1 
label var nt_ch_stunt "Stunted child under 5 years"
Re: Quetions about calculating stunting rates in Stata [message #18717 is a reply to message #18617] Mon, 03 February 2020 15:08 Go to previous messageGo to next message
Sheela is currently offline  Sheela
Messages: 3
Registered: December 2019
Member
Thanks very much for this response. Unfortunately this code is still not giving me the same results as what is shown in the table in the final report.

I am using the PR file (PEPR6IFL) from 2012 and referencing the Peru DHS Final Report from 2012 (Publication ID: FR284).

When I use the code as provided, I get the following results:

Severe stunting: 4.11% (N=9662)
Stunting: 20.59% (N=9662)

The report has the following results in the table (p.275 of the report):

Severe stunting: 3.4% (N=9168)
Stunting: 18.1% (N=9168)

Any assistance in reconciling this difference would be greatly appreciated! Thank you in advance.
Re: Quetions about calculating stunting rates in Stata [message #18745 is a reply to message #18717] Mon, 10 February 2020 14:07 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1748
Registered: February 2013
Senior Member
Following is another response from DHS Senior Analysis & Research Manager, Shireen Assaf:

I checked once more and the code matches the final report. I use the PEPR6IFL.dta file and the code provided produces the correct estimate. Please see the screen shot of the result. I think perhaps you are not applying weights. To apply the weights use the following command. The wt is the weight variable that was generated in the code provided.

tab1 nt_ch_sev_stunt  [iw=wt]

/index.php?t=getfile&id=1522&private=0
  • Attachment: stunted.png
    (Size: 55.94KB, Downloaded 34 times)
Re: Quetions about calculating stunting rates in Stata [message #18767 is a reply to message #18745] Mon, 17 February 2020 11:40 Go to previous message
Sheela is currently offline  Sheela
Messages: 3
Registered: December 2019
Member
Thank you, Shireen and Bridgette. This was very helpful. I appreciate your time and assistance!
Previous Topic: Estimating preterm birth
Goto Forum:
  


Current Time: Wed Feb 26 15:34:54 Eastern Standard Time 2020