Re: Missing BMI values in the DHS from 2011 [message #22708 is a reply to message #22691] |
Fri, 23 April 2021 08:47   |
Shireen-DHS
Messages: 140 Registered: August 2020 Location: USA
|
Senior Member |
|
|
Hello,
We do not have code on GitHub for glucose measurements.
To code the BMI in the PR file you can use the following CSPro code.
Best,
Shireen
preg = 0;
if SH231 = 2 then
if pidx(SH230,2) <> 0 <=> SH234 >= 50 then errmsg("Age in HH=%d Age in SH234=%d",HV105(SH230),SH234) endif;
if pidx(SH230,2) <> 0 and HA65(pidx(SH230,2)) = 1 then
if HA54(pidx(SH230,2)) = 1 then preg = 1; endif; { currently pregnant for completed interview }
else
if SH231 = 2 and SH232 = 1 then preg = 1; endif; { if woman is not eligible/incomplete interview }
endif;
endif;
{ BMI }
if SH19(SH230) <> 0 then { If weight and height measurements were in the women/men section }
if SH231 = 2 and HA13(pidx(SH230,2)) = 0 then { if woman measured }
xbmi = HA40(pidx(SH230,2));
elseif SH231 = 1 and HB13(pidx(SH230,1)) = 0 then { if man measured }
xbmi = HB40(pidx(SH230,1));
endif;
else
if SHWH = 0 then xbmi = SHBM; endif; { if weight and height measurements in Biomarkers section }
endif;
recode xbmi => nutrstat;
1200-1849 => 0; { Thin }
1850-2499 => 1; { Normal }
2500-2999 => 2; { Overweight }
3000-6000 => 3; { Obese }
=> 9;
endrecode;
if SH234C in 35:49 and SH231 = 2 and preg = 1 then nutrstat = 4; endif;
|
|
|