1  Methods

For this example, we are using the Kenya Continuous Household Survey Programme (KCHSP) 2022. Described in previous section ?sec-data-kchsp22.

Code
# Loading libraries
library(ggplot2)
library(dplyr)
library(tidyr)

#Function
source("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 renaming
roster <- 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 ID
roster$clhhid <- paste0(roster$clid,"_",  roster$hhid)
# HH member unique ID
roster$uniqueid <- paste0(roster$clid,"_",  roster$hhid, "_", roster$hhid_id)

# Assumptions
school.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 HH
nutrient_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:

  1. There is a variable that identify which women is lactating (e.g. info is provided in the survey).
  2. 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).
  3. 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 member
roster_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.
Code
## Energy adjustment for HH food allocation 
roster_adjusted <-  Enerc_adjustment(roster_test, 
                                  excl.bf = TRUE, excl.age = 3, 
                                  comple.bf = TRUE,  prev.complebf = 0.60,
                                  school = TRUE, feeding = TRUE, 
                                  meal_kcal = 629, school_days = 139,
                                  at_home = FALSE)

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-lactating
roster_test$preg_0.05 == 0])) # non-pregnant
[1] 2082.544
Code
### Calculating impact on AFE ----
roster_afe <- roster_adjusted %>% 
  mutate(
    afe = enerc_kcal/Energy_afe,
    afe_school = enerc_kcal_school/Energy_afe, 
    afe_feed = enerc_kcal_feeding/Energy_afe) 

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 AFE
roster_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.

Code
# Calculating individualisation from AFE
sac_only <-  roster_afe %>% 
  group_by(clhhid) %>% 
  summarise(clhhid, county, resid, weight_hh, weight_pop, uniqueid, sex, school_grade, age,school_attend, exp_feed,
    indv = round(afe_school/sum(afe_school), 2)) %>% # calculating the proportional food allocation
  filter(age >=6 & age<=13) # filtering SAC

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 AFE
nutrient_afe <- nutrient_summary %>%  # HH app. nutrient intakes
  left_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 Children
nutrient_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 SM
nutrient_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)
                )