# Loading librarieslibrary(ggplot2)library(dplyr)library(tidyr)#Functionsource("functions/Energy_requirements.R")source("functions/Energy_adjustments.R")# HH members info (Roster)roster <- haven::read_dta(here::here("data", "2022", "individuals_microdata.dta"))# Variable renamingroster <- roster %>%rename(sex ="b04", age_y ="b05_years", relation_head ="b03", age_m ="b05_months", dob_year ="b06_yrs", school_attend ="c03", school_attend_last ="c05", school_grade ="c06", exp_feed ="c09o") # Unique ids# Household unique IDroster$clhhid <-paste0(roster$clid,"_", roster$hhid)# HH member unique IDroster$uniqueid <-paste0(roster$clid,"_", roster$hhid, "_", roster$hhid_id)# Assumptionsschool.days <-195# Based on GCNF (2019). # School Meals (WFP)school_meal_df <-read.csv(here::here("data", "school_meals_data.csv"))# Nutrient apparent intakes at HHnutrient_summary <-readRDS(here::here("inter-outputs", "nutrient-apparent-intakes.RDS"))
1.1 Calulating Energy requirements of household members
The information needed for calculating the Energy requirement of each household member are: age, sex, weight, and pregnancy/lactation. Often weight, pregnancy and lactation are not available. These variables are then calculated and/or assumed based on information from other sources, e.g. Demographic and Health Surveys (DHS).
Here, it is calculated using a function Energy_requirements().
1.1.1 Note on the calculation of increase energy requirement due to lactation in the function
There are three options for identifying lactating women:
There is a variable that identify which women is lactating (e.g. info is provided in the survey).
The lactating women is assumed based on having a lactating child base on mother and child relation to the head of the household (e.g. info is provided to relationship , eg. mother/spouse and son/daughter, daughter and grandchild).
The lactating women is assumed based on cohabitation of a women (14-45yo) and a lactating infant (<24months).
The energy requirements for lactating women were extracted from Agriculture and U. S. Department ofHealth and Human Services (2020).
Note on assumptions
Summary of the main function assumptions/ decisions:
pal: Physical Activity Levels (PAL) assumed to be 1.6.
weight.m: Weight for adult men (>18yo) assumed 65Kg.
weight.f: Weight for adult women (>18yo) assumed 55Kg.
lac: (TRUE) increase in energy due to lactation will be calculated. Here it will based on the potential relationship of the women (14-45yo) with infants (< 24months).
preg: (TRUE) increase in energy due to pregnancy will be calculated. Based on pregnancy prevalence.
prev.preg: The prevalence of pregancy was 5.5% for the country.
Code
# Calculating the Energy requirements for each HH memberroster_test <-Enerc_requirement(roster, pal =1.6, weight.m =65, weight.f =55,lac =TRUE, preg =TRUE, prev.preg =0.05)
1.2 Adjusting the Energy requirments to food allocation
Some adjustment are needed when using the energy requirements to allocate the food consumed at the household level, for example, if an infant is exclusive breastfed, no food will be given to them, hence we will adjust their energy needs to zero. In other words, there will be no food allocated to the infant. Similarly, there are other cases when the food allocation (based on the energy) would need to be modifed, for instance, if children receive food at the school Borlizzi, Delgrossi, and Cafiero (2017).
This is also calculated using a function Energy_adjustments(). Like in the other function, some of this modules can be used or not based on the information available and/or the country context.
Note on assumptions
Summary of the main function assumptions/ decisions:
excl.bf: (TRUE) energy adjustment for infants with exclusive breastfeeding.
excl.age: Exclusive breastfeeding was assumed only for infants of <= 3months.
comple.bf: (TRUE) energy adjustment for infants with complementary breastfeeding (6-11months).
prev.complebf: In infant (12-24months), complementary breastfeeding was adjusted based on 60% prevalence.
school: (TRUE) energy adjustment for all the School Age Children (SAC, 6-13 yo) that attended school based on receiving one meal each school day. Only if attending this year (not considering last year attendance).
feeding: (TRUE) energy adjustment for all SAC (age 6-13 years old) attending school and spending money on school feeding based on receiving one meal each school day. If NA assumed not receiving school meal. Only if attending this year (not considering last year).
meal_kcal: The energy contribution for one meal at school was 629 kcal.
school_days: The number of school days were 195 days per year.
More information on the rationale for all the assumption used in the function are presented in previous section ?sec-data-kchsp22.
1.3 Calculating your household food allocation based on your population of interest
Once, we have calculated the Energy requirements and adjusted the energy intakes for other factors (e.g. school feeding), we can select the population of interest. Here, we used the Adult Female Equivalent (AFE) which has been described previously Tang et al. (2021).
Code
# Selecting the reference (non-pregnant, non-lactating women (14-49yo))years <-25# Requirement are the same for the age range.S <-2# Sex# Obtaining Energy requirement of ref.(Energy_afe <-unique(roster_test$enerc_kcal[roster_test$age == years & roster_test$sex == S &is.na(roster_test$lac_women) &# non-lactatingroster_test$preg_0.05==0])) # non-pregnant
Two type of analyses can be performed, depending on the objectives of your study: a) general population status, b) target population (individualisation).
1.3.1 General population apparent food intakes
For general population, the AFEs of each household member are summed to obtain the household AFE.
Code
# Calculating HH AFEroster_afe_hh <- roster_afe %>%group_by(clhhid) %>%# Getting the AFE, per AFE (+SM), per AFE (+ all SAC receiving SM)summarise(clhhid, county, resid, weight_hh, afe =sum(afe),afe_school =sum(afe_school),afe_feed =sum(afe_feed)) %>%distinct()
1.3.2 Target population (individualisation)
We calculated the proportional contribution to the total household AFE and used that for allocating the food. Here, we are selecting only school age children (SAC) (6-13yo), for this analysis, but other population of interest could be selected as well.
After choosing the allocation/individualisation method, information on food consumption can be matched to food composition data to evaluate apparent nutrient intakes.
1.4 Apparent nutrient intakes
Information on the cleaning and other steps to obtain the apparent nutrient intakes per household are reported in the ?sec-food-consumption.
Here, food composition data was adapted from the Kenya Nutrient Conversion Table developed by Ramos (2022), which can be accessed here.
1.4.1 General population using AFE
Apparent nutrient intakes at household level are transformed into AFE which would allow comparison of apparent nutrient intakes and calculation of risk of inadequacies.
Code
# Getting the nutrient apparent intakes per AFEnutrient_afe <- nutrient_summary %>%# HH app. nutrient intakesleft_join(., roster_afe_hh %>%pivot_longer(cols =starts_with("afe"), names_to ="hh_alloc")) %>%# Getting per AFE, per AFE (+SM), per AFE (+ all SAC receiving SM)mutate(across(starts_with("cons_"), ~./as.numeric(value), .names ="hh_alloc_{.col}")) # Calculating for all nut. available
1.4.2 Target population (individualisation of SAC)
Code
# Getting the nutrient apparent intakes per School Age Childrennutrient_sac <- sac_only %>%left_join(., nutrient_summary) %>%mutate( across(starts_with("cons_"), ~.*as.numeric(indv), .names ="sac_{.col}"))
For our target population, we are also adding the energy and nutrient contribution from the school meals.
Code
# Adding energy and nutrient contribution (per day) of SMnutrient_sac <- nutrient_sac %>%ungroup() %>%mutate(sac_cons_energy_kcal_school =ifelse(school_attend ==1&!is.na(school_attend), sac_cons_energy_kcal+(school_meal_df[1,]$ENERCkcal*school.days/365), sac_cons_energy_kcal),sac_cons_vitamin_b12_mcg_school =ifelse(school_attend ==1&!is.na(school_attend), sac_cons_vitamin_b12_mcg +(school_meal_df[1,]$VITB12mcg*school.days/365), sac_cons_vitamin_b12_mcg) )
Agriculture and U. S. Department ofHealth and Human Services, U. S. Department of. 2020. Dietary Guidelines for Americans, 2020-2025. 9th ed. DietaryGuidelines.gov.
Borlizzi, Andrea, Mauro Eduardo Delgrossi, and Carlo Cafiero. 2017. “National Food Security Assessment Through the Analysis of Food Consumption Data from Household Consumption and Expenditure Surveys: The Case of Brazil’s PesquisadeOrçamento Familiares 2008/09.”Food Policy, Food counts. Measuring food consumption and expenditures in household consumption and expenditure surveys (HCES), 72 (October): 20–26. https://doi.org/10.1016/j.foodpol.2017.08.009.
Ramos, María Priscila. 2022. “Kenya Nutrition Conversion Table (Kenya_NCT) (2022).” Repositorio Institucional de Salud REPISALUD. https://doi.org/10.4321/repisalud.25905.
Tang, Kevin, Katherine P. Adams, Elaine L. Ferguson, Monica Woldt, Alexander A. Kalimbira, Blessings Likoswe, Jennifer Yourkavitch, et al. 2021. “Modeling Food Fortification Contributions to Micronutrient Requirements in Malawi Using Household Consumption and Expenditure Surveys.”Annals of the New York Academy of Sciences n/a (n/a). https://doi.org/10.1111/nyas.14697.