Home » Countries » India » Final Estimates of Stunting
Re: Final Estimates of Stunting [message #15086 is a reply to message #15071] |
Thu, 31 May 2018 07:05 |
Mlue
Messages: 92 Registered: February 2017 Location: North West
|
Senior Member |
|
|
Hello Mayank,
Please see the code below - maybe it may help you.
You did not specify which dataset you're working with, I presume it's India DHS 2015-16... The code will work for most DHS surveys (if not all).
FYI:
I am not getting the total number of children as in the report, but the rates are the same...
I'm getting 219 796, but the report has 219 760 --- with difference 36 (I don't know where this is coming from)
************************************************************
Stata code
// USE "IAPR73FL" ON Stata
** CHILD NUTRITIONAL STATUS
** Table 10.1 Nutritional status of children
** Compiled by Mluleki Tsawe
** PhD student: University of the Western Cape, South Africa
** 31 May 2018
***** INDIA DHS 2015-2016
clear all
set mem 1g
set matsize 800
set maxvar 10000
cd "..."
use "IAPR73FL", clear
**********************************
** WEIGHT VARIABLE
gen weight = hv005/1000000
********************************************************************************
** SURVEY SET
gen psu = hv021
gen strata = hv022
svyset psu [pw = weight], strata(strata) vce(linearized)
*svydes
********************************************************************************
// RECODES & RENAMES
rename hc27 sex
rename hv270 wealth
rename hv025 residence
rename hv024 region
*rename shdist district
** CHILD AGE IN MONTHS
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"), gen(child_age)
label var child_age "Child age (months)"
label val child_age child_age
** CHILD AGE IN MONTHS 2
recode hc1 (0/4 = 1 "<5") (5/9 = 2 "5-9") (10/15 = 3 "10-15") (16/19 = 4 "16-19") ///
(20/25 = 5 "20-25") (26/35 = 6 "26-35") (36/49 = 7 "36-49") ///
(50/59 = 8 "50-59"), gen(child_age2)
label var child_age2 "Child age in months"
label val child_age2 child_age2
** STATE/UNION TERRITORY
recode region (6 12/14 25 28/29 34 = 1 "North") (7 19 33 = 2 "Central") ///
(5 15 26 35 = 3 "East") (3/4 21/24 30 32 = 4 "North-East") ///
(8/11 20 = 5 "West") (1/2 16/18 27 31 36 = 6 "South"), gen(state_territory)
label var state_territory "State or union territory of India"
label val state_territory state_territory
*tab state_territory [iw=weight], m
*tab region state_territory [iw=weight], m
** WEALTH STATUS
recode wealth (1/2=1 "Poor") (3=2 "Middle") (4/5=3 "Rich"), gen(wealth_rec)
label var wealth_rec "Household wealth _ recode"
label val wealth_rec wealth_rec
********************************************************************************
// CHILD MALNUTRITION INDICATORS (according to WHO)
** STUNTING = Height-for-age
cap drop stunting
gen stunting=0 if hv103==1
replace stunting=. if hc70>=9996
replace stunting=1 if hc70<-200 & hv103==1
label define stunting 0"Not stunting" 1"Stunting"
label var stunting "Stunting children"
label val stunting stunting
** WASTING = Weight-for-height
gen wasting=0 if hv103==1
replace wasting=. if hc72>=9996
replace wasting=1 if hc72<-200 & hv103==1
label define wasting 0"Not wasting" 1"Wasting"
label var wasting "Wasting children"
label val wasting wasting
** UNDERWEIGHT = Weight-for-age
gen underweight=0 if hv103==1
replace underweight=. if hc71>=9996
replace underweight=1 if hc71<-200 & hv103==1
label define underweight 0"Not underweight" 1"Underweight"
label var underweight "Underweight children"
label val underweight underweight
********************************************************************************
** DROP IF NOT WITHIN SAMPLE
qui regr stunting underweight wasting if stunting !=. & underweight !=. & wasting !=. [pw=weight]
drop if e(sample)!=1 /* drop observations with missings on any variable to be used in analysis */
********************************************************************************
** CHECK
svy: tab stunting, count format(%4.0f)
svy: tab wasting, count format(%4.0f)
svy: tab underweight, count format(%4.0f)
******************
svy: tab stunting, percent format(%4.1f)
svy: tab wasting, percent format(%4.1f)
svy: tab underweight, percent format(%4.1f)
********************************************************************************
** ========================================================================== **
** Table 10.2 Nutritional status of children by state/union territory **
cap drop zone
egen zone = group(state_territory region), label
tab zone
***************
tab zone stunting [iw=weight], row nof miss
tab zone wasting [iw=weight], row nof miss
tab zone underweight [iw=weight], row nof miss
/*
bys state_territory: tab region stunting [iw=weight], row nof miss
bys state_territory: tab region wasting [iw=weight], row nof miss
bys state_territory: tab region underweight [iw=weight], row nof miss
*/
***************
/*
svy: tab zone stunting, percent format(%4.1f) row miss
svy: tab zone wasting, percent format(%4.1f) row miss
svy: tab zone underweight, percent format(%4.1f) row miss
*/
********************************************************************************
** ========================================================================== **
********************************************************************************
** ========================================================================== **
********************************************************************************
** ========================================================================== **
exit
graph bar (mean) stunting [pweight = weight], over(residence) over(state_territory, label(angle(forty_five))) ///
asyvars blabel(bar, size(small) orientation(horizontal) format(%4.3f) gap(0.5)) ytitle(Average of child stunting) ///
ylabel(#10, labgap(medsmall)) title(Prevalence of stunting among children by residence) ///
subtitle(India Demographic and Health Survey) note(India (2015-16)) scheme(s2mono)
graph bar (mean) wasting [pweight = weight], over(residence) over(state_territory, label(angle(forty_five))) ///
asyvars blabel(bar, size(small) orientation(horizontal) format(%4.3f) gap(0.5)) ytitle(Average of child wasting) ///
ylabel(#10, labgap(medsmall)) title(Prevalence of wasting among children by residence) ///
subtitle(India Demographic and Health Survey) note(India (2015-16)) scheme(s2mono)
graph bar (mean) underweight [pweight = weight], over(residence) over(state_territory, label(angle(forty_five))) ///
asyvars blabel(bar, size(small) orientation(horizontal) format(%4.3f) gap(0.5)) ytitle(Average of child underweight) ///
ylabel(#10, labgap(medium)) title(Prevalence of being underweight among children by residence) ///
subtitle(India Demographic and Health Survey) note(India (2015-16)) scheme(s2mono)
********************************************************************************
** ========================================================================== **
********************************************************************************
** ========================================================================== **
********************************************************************************
** ========================================================================== **
|
|
|
Goto Forum:
Current Time: Fri Nov 22 05:51:38 Coordinated Universal Time 2024
|