Created
February 16, 2024 06:32
-
-
Save jmoy/25c57a32f798d5cd8f96207e7091b07b to your computer and use it in GitHub Desktop.
Calculate maternal health deprivation headcount from NFHS5 data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all | |
frame create maternal_depr | |
frame maternal_depr { | |
use "IABR7EFL.DTA" | |
keep if midx==1 | |
gen no_trained_assist = (m3a==0 & m3b==0 & m3c==0) | |
gen few_antenatal = m14<4 | |
gen missed = missing(m14) | missing(m3a) | missing(m3b) | missing(m3c) | m14>=98 | |
collapse (max) no_trained_assist few_antenatal missed, by(v001 v002) | |
gen deprived = no_trained_assist|few_antenatal | |
rename v001 hv001 | |
rename v002 hv002 | |
keep hv001 hv002 deprived missed | |
} | |
use hv001 hv002 hv005 using "IAHR7EFL.DTA" | |
frlink 1:1 hv001 hv002, frame(maternal_depr) | |
frget deprived missed,from(maternal_depr) | |
gen d = deprived if (missing(missed)|!missed) | |
replace d=0 if missing(d) & (missing(missed) | !missed) | |
count if missed==1 | |
mean d [pweight=hv005] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment