*-- #BDHS2022 data analysis | Some important variables

use "D:\abc\BDHS 2022\BDKR81DT\BDKR81FL.DTA", clear

*

gen swt= v005/1000000

gen clust= v021

gen str= v023

gen mage=(v008-v011)/12

*

gen DOB=mdy(b1, b17, b2)

format DOB %d

format %tdMon_DD,_CCYY DOB

*

gen SVDate=mdy( hw18 , hw17 , hw19)

format SVDate %d

format %tdMon_DD,_CCYY SVDate

*

la var swt "Sampling weight"

la var clust "Cluster code"

la var str "Strata code"

la var mage "Maternal age"

la var DOB "Child's date of Birth"

la var SVDate "Date of measurement"

*

for var v438 hw3 v437 hw2: replace X=. if X>9000

*

gen mht=v438/10

gen mwt=v437/10

gen cht=hw3/10

gen cwt=hw2/10

*

la var mht "Maternal height in cm"

la var mwt "Maternal weight in kg"

la var cht "Child's height in cm"

la var cwt "Child's weight in kg"

*

order swt clust str mage DOB SVDate mht mwt cht cwt

*keep if bidx==1

*------Part 4

sum v445 hw70 hw71 hw72

for var v445 hw70 hw71 hw72: replace X=. if X>9000

sum v445 hw70 hw71 hw72

*

gen bmi=v445/100

gen haz=hw70/100

gen waz=hw71/100

gen whz=hw72/100

*

la var haz "Height/age z score"

la var waz "Weight/age z score"

la var whz "Weight/height z score"

order swt clust str mage mht mwt bmi DOB SVDate cht cwt haz waz whz

keep swt clust str mage mht mwt bmi DOB SVDate cht cwt haz waz whz

*

gen stunting = haz

More Md Ahshanul Haque's questions See All
Similar questions and discussions