Re: anaemia in children [message #25712 is a reply to message #25710] |
Wed, 30 November 2022 01:00 |
Sadhvi
Messages: 5 Registered: November 2022
|
Member |
|
|
Hi.
The following is the code in r that I am using.
hh_recode = read_sas("Path\\IAPR7BFL.SAS7BDAT")
# Here I am filtering out the children who slept in the household last night, and aged 6 to 59 months and have a non-NA value for the anaemia status - HC57
cleanedAneSubsetNfhs5 = hh_recode[hh_recode$HV103 == 1 & !is.na(hh_recode$HC1) & hh_recode$HC1 > 5 & hh_recode$HC1 < 60 & !is.na(hh_recode$HC57),]
#overall anaemia
weightedSample = sum(cleanedAneSubsetNfhs5$HV005)/ 1000000
#now filtering out the children who have mild, moderate or severe anaemia as given by the variable HC57.
WeightedAnChildren = sum(cleanedAneSubsetNfhs5$HV005[cleanedAneSubsetNfhs5$HC57 %in% c(1,2,3)]) / 1000000
anemiaPrevalence = WeightedAnChildren/weightedSample
# Results: The total sample that turns out is 178952.3 but the number given in table 10.12 of the national report is 152,752. And the prevalence of anemia in children 6 to 59 months is 68.07%
[Updated on: Wed, 30 November 2022 01:01] Report message to a moderator
|
|
|