Hi Anik,
Please check the following code which may help you...
I believe that the following code will match the BDHS report figure (number of children = 7 318)
FOR Stata
// USE "BDPR72FL" ON Stata
** CHILD NUTRITIONAL STATUS
** Table 11.1 Nutritional status of children
** Compiled by Mluleki Tsawe
** PhD student: University of the Western Cape, South Africa
***** BANGLADESH DHS 2014
clear all
set mem 1g
set matsize 800
set maxvar 10000
cd "..."
use "BDPR72FL", 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
** 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)
********************************************************************************
********************************************************************************
********************************************************************************
svy: tab child_age stunting, percent format(%4.1f) row miss
svy: tab child_age wasting, percent format(%4.1f) row miss
svy: tab child_age underweight, percent format(%4.1f) row miss
exit
*********************************************
FOR SPSS
*// [ OPEN THE DATA - HOUSEHOLD MEMBER RECODE ] **.
** BANGLADESH DHS 2014 **.
** **.
GET
STATA FILE='...\BDPR72FL.DTA'.
DATASET NAME DataSet1 WINDOW=FRONT.
************************************************************************************************************************************.
** WEIGHT VARIABLE.
COMPUTE weight = hv005/1000000.
WEIGHT BY weight.
** COMPLEX SURVEY VARIABLES.
COMPUTE psu = hv021.
COMPUTE strata = hv023.
************************************************************************************************************************************.
RENAME VARIABLES (hc27 = sex) (hv270 = wealth) (hv025 = residence) (hv024 = region).
************************************************************************************************************************************.
** CHILD AGE IN MONTHS.
RECODE hc1 (0 THRU 5 = 1) (6 THRU 8 = 2) (9 THRU 11 = 3)
(12 THRU 17 = 4) (18 THRU 23 = 5) (24 THRU 35 = 6) (36 THRU 47 = 7)
(48 THRU 59 = 8) INTO child_age.
VARIABLE LABELS child_age 'Child age (months)'.
EXECUTE.
VALUE LABELS child_age 1 "0-5 months" 2 "6-8 months" 3 "9-11 months" 4 "12-17 months" 5 "18-23 months" 6 "24-35 months" 7 "36-47 months" 8 "48-59 months".
SELECT IF child_age LE 8.
************************************************************************************************************************************.
** STUNTING = Height-for-age.
COMPUTE stunting=$SYSMIS.
IF hv103=1 stunting=0.
IF missing(hc70) stunting=$SYSMIS.
IF (hc70>=9996) stunting= $SYSMIS.
IF (hc70 LT -200 AND hv103=1) stunting = 1.
EXECUTE.
VARIABLE LABELS stunting 'Stunting children'.
VALUE LABELS stunting 0 "Not stunting" 1 "Stunting" .
************************************************************************************************************************************.
** WASTING = Weight-for-height.
COMPUTE wasting=$SYSMIS.
IF hv103=1 wasting=0.
IF missing(hc72) wasting=$SYSMIS.
IF (hc72>=9996) wasting= $SYSMIS.
IF (hc72 LT -200 AND hv103=1) wasting = 1.
EXECUTE.
VARIABLE LABELS wasting 'Wasting children'.
VALUE LABELS wasting 0 "Not wasting" 1 "Wasting" .
************************************************************************************************************************************.
** UNDERWEIGHT = Weight-for-age.
COMPUTE underweight=$SYSMIS.
IF hv103=1 underweight=0.
IF missing(hc71) underweight=$SYSMIS.
IF (hc71>=9996) underweight= $SYSMIS.
IF (hc71 LT -200 AND hv103=1) underweight = 1.
EXECUTE.
VARIABLE LABELS underweight 'Underweight children'.
VALUE LABELS underweight 0 "Not underweight" 1 "Underweight" .
************************************************************************************************************************************.
************************************************************************************************************************************.
************************************************************************************************************************************..
************************************************************************************************************************************.
************************************************************************************************************************************.
SELECT IF stunting LE 1 & wasting LE 1 & underweight LE 1.
** CHECK.
FREQUENCIES VARIABLES= stunting wasting underweight
/ORDER=ANALYSIS.
************************************************************************************************************************************.
CROSSTABS
/TABLES=child_age sex wealth residence region BY stunting
/FORMAT=AVALUE TABLES
/CELLS=ROW
/COUNT ROUND CELL.
CROSSTABS
/TABLES=child_age sex wealth residence region BY underweight
/FORMAT=AVALUE TABLES
/CELLS=ROW
/COUNT ROUND CELL.
CROSSTABS
/TABLES=child_age sex wealth residence region BY wasting
/FORMAT=AVALUE TABLES
/CELLS=ROW
/COUNT ROUND CELL.
************************************************************************************************************************************.