Skip to contents

This function calculates a food security sectoral composite score based on the food security phase. It assigns a score from 1 to 5 corresponding to the food security phase, and determines if a household is in need or in acute need of food security assistance. Apply prerequisite food security functions re-exported from https://github.com/impact-initiatives/impactR4PHU FCS - add_fcs.R HHS - add_hhs.R rCSI - add_rcsi.R

Usage

add_comp_foodsec(
  df,
  fc_phase = "fsl_fc_phase",
  phase1 = "Phase 1 FC",
  phase2 = "Phase 2 FC",
  phase3 = "Phase 3 FC",
  phase4 = "Phase 4 FC",
  phase5 = "Phase 5 FC"
)

Arguments

df

A data frame.

fc_phase

Column name for the food security phase.

phase1

Label for Phase 1 FC.

phase2

Label for Phase 2 FC.

phase3

Label for Phase 3 FC.

phase4

Label for Phase 4 FC.

phase5

Label for Phase 5 FC.

Value

A data frame with additional columns:

  • comp_foodsec_score: Food security composite score (1-5)

  • comp_foodsec_in_need: Binary indicator for being in need of food security assistance

  • comp_foodsec_in_acute_need: Binary indicator for being in acute need of food security assistance