Package 'riycf'

Title: Utilities for Calculating Infant and Young Child Feeding Indicators
Description: This package aims to generate updated indicators to assess infant and young child feeding (IYCF) practices at the individual under 2 years old children level. The indicators were developed using the technical guideline from the Indicators for assessing infant and young child feeding practices: definitions and measurement methods <https://www.who.int/publications/i/item/9789240018389>.
Authors: Nicholus Tint Zaw [aut, cre, cph], Ernest Guevarra [aut, cph] (ORCID: <https://orcid.org/0000-0002-4887-4415>), Rebecca Wolfe [rev]
Maintainer: Nicholus Tint Zaw <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9000
Built: 2026-10-28 06:44:23 UTC
Source: https://github.com/nutriverse/riycf

Help Index


Construction of Dummy Variable(s)

Description

generate dummy variables based on the input vector(s) binary parameters (true = 1 and false = 0). If the observation of one of the input parameter was true, that observation's newly generated dummy variable will return as true (1). And, if all input parameters were false, the return will be false (0).

Usage

get_dummy(var_list = NULL)

Arguments

var_list

list of food consumption variables

Value

the vector with "0" and "1" binary result.

Author(s)

Nicholus Tint Zaw

Examples

# Individual Food Group Variable Construction

 df <- iycfData

# Individual Food Group Specific Function
 breastmilk <- get_dummy(var_list = list(df$child_bfyest))

 grains <- get_dummy(var_list = list(df$child_rice, df$child_potatoes))

 pulses <- get_dummy(var_list = list(df$child_beans))

 dairy_list <- list(df$child_bms, df$child_milk,
                    df$child_mproduct, df$child_yogurt,
                    df$child_yogurt)

 dairy <- get_dummy(var_list = dairy_list)

 meat_list <- list(df$child_organ, df$child_insects,
                   df$child_beef, df$child_fish)

 meat <- get_dummy(var_list = meat_list)

 eggs <- get_dummy(var_list = list(df$child_eggs))

 vita_fruveg_list <- list(df$child_pumpkin,
                          df$child_leafyveg,
                          df$child_mango)

 vita_fruveg <- get_dummy(var_list = vita_fruveg_list)

 oth_fruveg <- get_dummy(var_list = list(df$child_fruit, df$child_fruit))

Construct exclusive breastfeeding status for under 6 months old child

Description

Identification of individual 0-5 months old children exclusive breastfeeding status

Usage

get_ebf(q4, age, liquid_food, solid_food)

Arguments

q4

The binary variable which mentioned that the child was receiving breastfeeding in the previous day (yes = "1", no = "0").

age

This parameter holds the information about child age in the month format.

liquid_food

The binary variable which mentioned that the child was receiving any type of liquid foods beside breastfeeding yesterday (yes = 1 or no = 0).

solid_food

The binary variable which mentioned that the child was receiving any type of solid foods yesterday (yes = 1 or no = 0).

Value

A vector of binary values indicating whether a child was exclusively breastfed or not during the previous day (1 = Yes or 0 = No).

Author(s)

Nicholus Tint Zaw

Examples

df <- iycfData

# Liquid consumption previous day - yes/no
 liquid <- list(df$child_vitdrop, df$child_ors, df$child_water,
                df$child_juice, df$child_broth, df$child_porridge,
                df$child_bms, df$child_milk, df$child_mproduct,
                df$child_liquid)

 df$liquid_food <- get_dummy(var_list = liquid)


# Solid food consumption previous day - yes/no
 solid <- list(df$child_rice, df$child_potatoes, df$child_pumpkin,
               df$child_beans, df$child_leafyveg, df$child_mango,
               df$child_fruit, df$child_organ, df$child_beef, df$child_fish,
               df$child_insects, df$child_eggs, df$child_yogurt,
               df$child_fat, df$child_plam, df$child_sweets,
               df$child_condiments)

 df$solid_food <- get_dummy(var_list = solid)


# Child exclusively breastfed
ebf <- get_ebf(df$child_bfyest, df$calc_age_months, df$liquid_food,
               df$solid_food)

Create other breastfeeding-related indicators

Description

Identification of individual 0-23 months old children breastfeeding status:

  • Ever breastfed;

  • Early initiation of breastfeeding;

  • Exclusive breastfeeding for the first two days after birth;

  • Mixed milk feeding under 6 months;

  • Continuous breastfeeding 12-23 months; and,

  • Bottle feeding 0-23 months.

Usage

get_evbf(q4, age)

get_eibf(age, q2, q2_hour)

get_ebf2d(q3, age)

get_mixmf(q4, age, q6b, q6c)

get_cbf(q4, age)

get_bof(q5, age)

Arguments

q4

An integer vector indicating whether the child breastfed in the previous day. 1 = Yes; 0 = No.

age

An integer vector of child's age in months.

q2

An integer vector indicating whether the child was put to the breast immediately, within hours, or within days. 0 = immediately; 1 = for hours; 2 = for days.

q2_hour

An integer vector for the number of hours after birth the child was put to the breast.

q3

An integer vector indicating whether the child had anything else beside breastmilk within the first two days after birth. 1 = Yes; 0 = No.

q6b

An integer vector indicating whether the child had infant formula feeding in the previous day. 1 = Yes; 0 = No.

q6c

An integer vector indicating whether the child had any dairy products such as milk from animals or fresh, tinned or powdered milk. 1 = Yes; 0 = No.

q5

An integer vector indicating whether the child fed with a bottle in the previous day. 1 = Yes; 0 = No.

Value

An integer vector indicating whether the child meets the definition of the respective breastfeeding indicator: 1 = Yes; 0 = No.

Author(s)

Nicholus Tint Zaw

Examples

df <- iycfData

# Ever Breastfed
evbf <- get_evbf(df$child_bf, df$calc_age_months)

# Early Initiation of Breastfeeding
eibf <- get_eibf(df$calc_age_months, df$child_eibf, df$child_eibf_hrs)

# Exclusive Breastfeeding for the first two days after birth
q3 <- rbinom(n = nrow(df), size = 1, prob = 0.5)

ebf2d <- get_ebf2d(q3, df$calc_age_months)

# Mixed Milk Feeding Under 6 months
mixmf <- get_mixmf(
  df$child_bfyest, df$calc_age_months, df$child_bms, df$child_milk
)

# Continuous Breastfeeding 12-23 months
cbf <- get_cbf(df$child_bfyest, df$calc_age_months)

# Bottle Feeding 0-23 months
q5 <- rbinom(n = nrow(df), size = 1, prob = 0.5)

bof <- get_bof(q5, df$calc_age_months)

Construct the food groups consumption score (from Minimum Dietary Diversity 6-23 months (MDD))

Description

Identification of individual 6-23 months old children who meet the minimum dietary diversity requirement require the information about how many food groups the child consumed yesterday (8 groups in total).

Usage

get_foodscore(
  breastmilk,
  grains,
  pulses,
  dairy,
  meat,
  eggs,
  vita_fruveg,
  oth_fruveg
)

Arguments

breastmilk

child received breastfeeding or not

grains

child consumed grains food group or not

pulses

child consumed pulses food group or not

dairy

child consumed diary and milk product food group or not

meat

child consumed meat food group or not

eggs

child consumed eggs food group or not

vita_fruveg

child consumed vitamin A-rich fruits and vegetables or not

oth_fruveg

child consumed fruits and vegetables or not

Value

the integer value at continuous scale (0-8 as the IYCF food groups have 8 food groups).

Author(s)

Nicholus Tint Zaw

Examples

# Individual Food Group Variable Construction

 df <- iycfData

# General Dummy variable generator function
 breastmilk <- round(runif(nrow(df), min = 0, max = 1), 0)
 grains <- round(runif(nrow(df), min = 0, max = 1), 0)
 pulses <- round(runif(nrow(df), min = 0, max = 1), 0)
 dairy <- round(runif(nrow(df), min = 0, max = 1), 0)
 meat <- round(runif(nrow(df), min = 0, max = 1), 0)
 eggs <- round(runif(nrow(df), min = 0, max = 1), 0)
 vita_fruveg <- round(runif(nrow(df), min = 0, max = 1), 0)
 oth_fruveg <- round(runif(nrow(df), min = 0, max = 1), 0)

 # Calculate Food Consumption Score
 food_score <- get_foodscore(breastmilk, grains, pulses, dairy, meat,
                             eggs, vita_fruveg, oth_fruveg)

Construct other breastfeeding related indicators (from IYCF)

Description

Identification of individual 0-23 months old children breastfeeding status

Usage

get_isssf(solid_food, age)

get_eff(egg_meat, age)

get_swb(sweet, age)

get_ufc(unhealthy, age)

get_zvf(vege_fruit, age)

Arguments

solid_food

The binary variable which mentioned that the child was received any type of solid foods yesterday (yes = 1 or no = 0).

age

This parameter holds the information about child age in the month format.

egg_meat

The binary variable which mentioned that the child was received any egg and/or flesh food yesterday

sweet

The binary variable which mentioned that the child was received any sweet beverage foods yesterday

unhealthy

The binary variable which mentioned that the child was received the unhealthy food consumption: sweets and instant foods

vege_fruit

The binary variable which mentioned that the child was received any vegetables or fruits yesterday

Value

binary variables indicate child met the respective complementary feeding status or not (yes = 1 or no = 0)

Author(s)

Nicholus Tint Zaw

Examples

df <- iycfData

# Introduction of Solid, Semi-solid or soft foods (6-8 months)
# Solid food consumption previous day - yes/no
 solid <- list(df$child_rice, df$child_potatoes, df$child_pumpkin,
               df$child_beans, df$child_leafyveg, df$child_mango,
               df$child_fruit, df$child_organ, df$child_beef, df$child_fish,
               df$child_insects, df$child_eggs, df$child_yogurt,
               df$child_fat, df$child_plam, df$child_sweets,
               df$child_condiments)

 df$solid_food <- get_dummy(var_list = solid)

 isssf <- get_isssf(df$solid_food, df$calc_age_months)


# Egg and/or Flesh food consumption (6-23 months)
# Egg and/or Flesh food consumption previous day - yes/no
 egg_meat <- list(df$child_organ, df$child_beef, df$child_fish,
                  df$child_insects, df$child_eggs)

 df$egg_meat <- get_dummy(var_list = egg_meat)

 eff <- get_eff(df$egg_meat, df$calc_age_months)

# Sweet beverage consumption (6-23 months)
# Sweet beverage consumption previous day - yes/no
 sweet <- list(df$child_milk_sweet, df$child_mproduct_sweet,
               df$child_chocolate, df$child_juice, df$child_soda,
               df$child_tea_sweet, df$child_oth_drink_swee)

 df$sweet <- get_dummy(var_list = sweet)

 swb <- get_swb(df$sweet, df$calc_age_months)

# Unhealthy food consumption (6-23 months)
# Unhealthy food consumption previous day - yes/no
 unhealthy <- list(df$child_sweets, df$child_condiments)

 df$unhealthy <- get_dummy(var_list = unhealthy)

 ufc <- get_ufc(df$unhealthy, df$calc_age_months)

# Zero vegetable or fruit consumption (6-23 months)
# Zero vegetable or fruit consumption previous day - yes/no
 vege_fruit <- list(df$child_pumpkin, df$child_leafyveg, df$child_mango,
                    df$child_fruit)

 df$vege_fruit <- get_dummy(var_list = vege_fruit)

 zvf <- get_zvf(df$vege_fruit, df$calc_age_months)

Determining Minimum Acceptable Diet

Description

Identification of individual 6-23 months old children minimum acceptable diet based on their breastfeeding status

Identification of individual 6-23 months old children dietary practices meet the minimum requirement of dietary diversity (at least 5 food group out of 8 food groups)

Usage

get_mad(age, q4, mdd, mmf, mmff)

get_mdd(food_score, age)

Arguments

age

This parameter holds the information about child age in the month format.

q4

The binary variable which mentions that the child was receiving breastfeeding in the previous day (yes = "1", no = "0").

mdd

The binary variable which holds whether the child received the minimum dietary diversity or not (yes = "1", no = "0").

mmf

The binary variable which indicates that the child got minimum meal frequency ("1") or not ("0").

mmff

This parameter is about the non-breastfed children received minimum milk feeding frequency or not (yes = "1", no = "0").

food_score

the integer variable with continuous scale which indicates the number of food groups the child consumed in previous day

Value

binary variable indicate child get the minimum acceptable diet (mad =1 ) or not (mad = 0)

binary variables indicate child get the minimum dietary diversity (mdd = 1 ) or not (mdd = 0)

Author(s)

Nicholus Tint Zaw

Examples

df <- iycfData
  df$mdd <- rbinom(n = nrow(df), size = 1, prob = 0.5)
  df$mmf <- rbinom(n = nrow(df), size = 1, prob = 0.5)
  df$mmff <- rbinom(n = nrow(df), size = 1, prob = 0.5)

  mad <- get_mad(df$calc_age_months, df$child_bfyest, df$mdd, df$mmf, df$mmff)



# Minimum Dietary Diversity
  df <- iycfData

  df$food_score <- round(runif(nrow(df), min = 0, max = 8), 0)

  mdd <- get_mdd(df$food_score, df$calc_age_months)

Determining Minimum Meal Freq

Description

Identification of individual 6-23 months old children received the minimum meal frequency based on their breastfeeding status.

Usage

get_mmf(mmf_bf, mmf_nonbf)

get_mmf_bf(mmfbf_6to8, mmfbf_9to23)

get_mmf_bf_6to8(q4, q8, age)

get_mmf_bf_9to23(q4, q8, age)

get_mmf_nonbf(q4, q8, nonbf_frq, age)

get_nonbf_frq(q6bnum, q6cnum, q6dnum, q8)

Arguments

mmf_bf

to The binary variable indicates that the overall breastfed child received minimum meal frequency or not.

mmf_nonbf

The binary variable indicates that the overall non-breastfed child received minimum meal frequency or not.

mmfbf_6to8

to The binary variable indicates that the 6-8 months breastfed child received minimum meal frequency or not.

mmfbf_9to23

The binary variable indicates that the 9-23 months breastfed child received minimum meal frequency or not.

q4

The binary variable which mentioned that the child received breastfeeding in the previous day (yes = "1", no = "0").

q8

the integer variable with continuous scale indicates the number of meals (solid, semi-solid or soft foods) the child ate yesterday.

age

This parameter holds the information about child age in the month format.

nonbf_frq

the integer variables with continuous scale presents the frequency of non-Breastfed child meal including milk feeding.

q6bnum

This parameter indicates the number of infant formula feeding the children received in previous days.

q6cnum

This parameter holds information about the frequency of milk related food feeding the child received yesterday (milk from animals, such as fresh, tinned, or powdered milk)

q6dnum

This parameter presents the information about the frequency of yogurt drinks the child received in the previous day.

Value

binary variables indicate child get the minimum meal frequency (mmf =1 ) or not (mmf = 0)

Author(s)

Nicholus Tint Zaw

Examples

# Minimum Meal Frequency

  df <- iycfData

  # breastfeeding children
  mmfbf_6to8 <- get_mmf_bf_6to8(df$child_bfyest,
                                df$child_food_freq,
                                df$calc_age_months)
  mmfbf_9to23 <- get_mmf_bf_9to23(df$child_bfyest,
                                  df$child_food_freq,
                                  df$calc_age_months)

  mmf_bf <- get_mmf_bf(mmfbf_6to8, mmfbf_9to23)

  # non-breastfeeding children
  nonbf_frq <- get_nonbf_frq(df$child_bms_freq,
                             df$child_milk_freq,
                             df$child_mproduct_freq,
                             df$child_food_freq)

  mmf_nonbf <- get_mmf_nonbf(df$child_bfyest,
                             df$child_food_freq,
                             nonbf_frq,
                             df$calc_age_months)


  # all children
  mmf <- get_mmf(mmf_bf, mmf_nonbf)

Determining Minimum Milk Feeding Frequency

Description

Identification of individual 6-23 months old children minimum milk feeding frequency for non-breastfeed children 6-23 months (MMFF)

Usage

get_mmff(q4, age, milk_frq)

get_milk_frq(q6bnum, q6cnum, q6dnum, q7anum)

Arguments

q4

The binary variable which mentioned that the child was receiving breastfeeding in the previous day (yes = "1", no = "0").

age

This parameter holds the information about child age in the month format.

milk_frq

the integer variable with continuous scale represents all the milk consumption frequency (beside breastmilk)

q6bnum

This parameter indicates the number of infant formula feeding the children received in previous days.

q6cnum

This parameter holds information about the frequency of milk related food feeding the child received yesterday (milk from animals, such as fresh, tinned, or powdered milk)

q6dnum

This parameter presents the information about the frequency of yogurt drinks the child received in the previous day.

q7anum

the integer variable with continuous scale represents the frequency of yogurt (solid or semi-solid) the child consumed yesterday.

Value

The output of the get_mmff and get_milk_frq variables includes the following added variable.

Variables Description
mf_frq continuous variables indicate non-breastfeed child consume number of milk and milk-product food feeding
mmff binary variables indicate child get the minimum milk feeding frequency (mmff =1 ) or not (mmff = 0)

Author(s)

Nicholus Tint Zaw

Examples

# Calculate Non-breastfeed Children Milk Frequency
 df <- iycfData

 df$milk_frq <- get_milk_frq(df$child_bms_freq, df$child_milk_freq,
                             df$child_mproduct_freq, df$child_yogurt)

# MMFF
df$mmff <- get_mmff(df$child_bfyest, df$calc_age_months, df$milk_frq)

Infant and young child feeding indicators sample dataset

Description

This is an example IYCF dataset from CARE International Myanmar country programme. All personally identifiable information have been excluded.

Usage

iycfData

Format

A data frame with 46 columns and 359 rows.

Variables WHO Question Number Description
csex Sex of child; 1 = male; 0 = female.
calc_age_months Age of child in months (calculated).
child_bf Q1 Has child ever been breastfed?; 1 = Yes; 0 = No.
child_eibf Q2 When was child first put to the breast: 0 = immediately; 1 = hours; 2 = days; 999 = Don't know/no response.
child_eibf_hrs Q2 If child_eibf is 1, number of hours child first put to the breast; integer value.
child_eibf_days Q2 If child_eibf is 2, number of days child first put to the breast; integer value.
bf_2days Q3 Has child been given anything other than breast milk within the child's first 2 days of age? 1 = Yes; 0 = No.
child_bfyest Q4 Has child been breastfed yesterday during the day or at night? 1 = Yes; 0 = No.
bf_bottle Q5 Has child had anything from a bottle with a nipple yesterday? 1 = Yes; 0 = No.
child_water Q6A Has child had plain water yesterday? 1 = Yes; 0 = No.
child_bms Q6B Has child had infant formula yesterday? 1 = Yes; 0 = No.
child_bms_freq Q6Bnum How many times has child had infant formula? Integer value.
child_milk Q6C Has child had milk from animals yesterday? 1 = Yes; 0 = No.
child_milk_freq Q6Cnum How many times has child had milk from animals? Integer value.
child_milk_sweet Q6Cswt For children who had milk from animals, was milk sweetened or flavoured? 1 = Yes; = No.
child_mproduct Q6D Has child had yogurt drinks yesterday? 1 = Yes; 0 = No.
child_mproduct_freq Q6Dnum How many times has child had yogurt drinks? Integer value.
child_mproduct_sweet Q6Dswt Has child had sweet or flavoured yogurt drinks yesterday? 1 = Yes; 0 = No.
child_chocolate Q6E Has child had chocolate-flavoured drinks yesterday? 1 = Yes; 0 = No.
child_juice Q6F Has child had fruit juice or fruit-flavoured drinks yesterday? 1 = Yes; 0 = No.
child_soda Q6G Has child had sodas, malt drinks, sports drinks, or energy drinks yesterday? 1 = Yes; 0 = No.
child_tea Q6H Has child had tea, coffee, or herbal drinks yesterday? 1 = Yes; 0 = No.
child_tea_sweet Q6Hswt Has child had sweetened tea, coffee, or herbal drinks yesterday? 1 = Yes; 0 = No.
child_broth Q6I Has child had clear broth or clear soup yesterday? 1 = Yes; 0 = No.
child_oth_drink Q6J Has child had any other liquids yesterday? 1 = Yes; 0 = No.
child_oth_drink_sweet Q6Jswt Has child had any other sweetened liquids yesterday? 1 = Yes; 0 = No.
child_yogurt Q7A Has child had yogurt other than yogurt drinks yesterday? 1 = Yes; 0 = No.
child_yogurt_frq Q7Anum How many times has child had yogurt other than yogurt drinks yesterday? 1 = Yes; 0 = No.
child_rice Q7B Has child had porridge, bread, rice, noodles, pasta yesterday? 1 = Yes; 0 = No.
child_pumpkin Q7C Has child had pumpkin, carrots, sweet potatoes (yellow or orange inside) yesterday? 1 = Yes; 0 = No.
child_potatoes Q7D Has child had plantains, white potatoes, white yams, manioc, cassava yesterday? 1 = Yes; 0 = No.
child_leafyveg Q7E Has child had dark green leafy vegetables yesterday? 1 = Yes; 0 = No.
child_oth_veg Q7F Has child had any other vegetables yesterday? 1 = Yes; 0 = No.
child_mango Q7G Has child had ripe mangoes, ripe papayas yesterday? 1 = Yes; 0 = No.
child_fruit Q7H Has child had any other fruits yesterday? 1 = Yes; 0 = No.
child_organ Q7I Has child had liver, kidney, heart yesterday? 1 = Yes; 0 = No.
child_processmeat Q7J Has child had sausages, hot dogs, ham, bacon, salami, canned meat yesterday? 1 = Yes; 0 = No.
child_beef Q7K Has child had any other meat, such as beef, pork, lamb, goat, chicken, duck yesterday? 1 = Yes; 0 = No.
child_eggs Q7L Has child had eggs yesterday? 1 = Yes; 0 = No.
child_fish Q7M Has child had fresh fish, dried fish, or shellfish yesterday? 1 = Yes; 0 = No.
child_beans Q7N Has child had beans, peas, lentils, nuts, seeds yesterday? 1 = Yes; 0 = No.
child_cheese Q7O Has child had hard or soft cheese yesterday? 1 = Yes; 0 = No.
child_sweets Q7P Has child had sweet foods such as chocolates, candies, cakes, and biscuits yesterday? 1 = Yes; 0 = No.
child_snack Q7Q Has child had chips, crisps, puffs, french fries, instant noodles yesterday? 1 = Yes; 0 = No.
child_oth_food Q7R Has child had any other solid, semi-solid or soft food yesterday? 1 = Yes; 0 = No.
child_food_freq Q8 How many times has child had any solid, semi-solid, or soft foods yesterday? 1 = Yes; 0 = No.

Source

CARE Myanmar

Examples

iycfData